Guides
Extensions register declarative data into six slots. The input pipeline (guards, IME merge, atom selection) stays in the kernel.
import { Editor, markloomKit } from 'markloom/view'
// default when extensions omitted:
new Editor(el, doc, { extensions: markloomKit() })
// drop or add:
new Editor(el, doc, {
extensions: [
...markloomKit().filter((e) => e.name !== 'something'),
myExtension,
],
})
| Slot | Examples |
|---|---|
marks | bold, link, highlight, textStyle |
blocks | heading, list, callout, code |
keymap | Mod-b → toggle mark |
inputRules | # , - , ```, --- |
pasteRules | string→string transforms |
decorations | bubble menu, drag handle, slash |
Some features are intentionally not in the kit (parity with Tiptap’s non-StarterKit extras): typography replacements, invisible characters, emoji shortcodes — import and append when needed.
new Editor(el, doc, {
nodeViews: {
code: myCodeView, // default is shiki-based
},
})
Code block rendering is swappable without changing the block type grammar.
Do not reimplement the input control flow as ordered plugins. markloom’s correctness depends on fixed ordering of guards + mapInput + IME merge. Contribute data; leave the spine alone.