Download this file
| 1 | // editor-entry.js — the editor bundle's entry (spec §6.2). Loaded as a |
| 2 | // module, so deferred, only on pages the viewer may edit; it mounts the |
| 3 | // editor on the page's <article> (page.mjs). The fidelity layer is |
| 4 | // exported too, for the gates and for a look from the console. |
| 5 | import { createSchema } from './schema.mjs' |
| 6 | import { start } from './page.mjs' |
| 7 | |
| 8 | export { createSchema } |
| 9 | export { fromMarkdown } from './fromMarkdown.mjs' |
| 10 | export { |
| 11 | serialise, serialiseDetailed, structureCheck, docBlocks |
| 12 | } from './serialize.mjs' |
| 13 | export { |
| 14 | Fidelity, mount, recordBody, rebuild, applyBody, prepareSave, reparse, |
| 15 | settle, fidelityPlugin, fidelityKey |
| 16 | } from './fidelity.mjs' |
| 17 | export { |
| 18 | clipboardPlugin, copyData, pasteTransaction, textSlice, mapaType |
| 19 | } from './clipboard.mjs' |
| 20 | |
| 21 | export const schema = createSchema() |
| 22 | |
| 23 | // The page's editor, once mounted: the gates read it. |
| 24 | export const editor = typeof document === 'undefined' ? null : start() |
| 25 | if (editor) globalThis.mapaEditor = editor |
| 26 | |