Write (cantext)
Loading
import { createEditor, documentStructureToMarkdown } from "@pixxl-tools/cantext";
const editor = createEditor({ initialValue: "Draft" });
editor.dispatch({ type: "insertText", text: " ready" });
const markdown = documentStructureToMarkdown(editor.getDocumentStructure());
editor.destroy();