Wwordcraft-reactv0.3.6
@gamine/wordcraft-react

Without React

Mount the editor in any element with the framework-free core.

import { createWordcraft, preloadWordcraft } from '@gamine/wordcraft-react/core';

preloadWordcraft();               // optional: start the download early
const editor = await createWordcraft(document.getElementById('editor')!, {
  document: { name: 'letter.docx', data: await (await fetch('/letter.docx')).arrayBuffer() },
  onSave: (file) => upload(file),
});

The /core entry point has no React dependency, and importing it on the server is safe.

Up next