Reference
Every extension
All 81 of them live in @matrajs/core and carry 137 commands between them. Each has its own page below, and they are in the sidebar too.
Installing only what you want
There is no @matrajs/table to install · you already have the table, and you turn
it on by importing it. That is the difference from an editor where every extension is its own
package.
npm install @matrajs/core Then pass only the extensions you want. A table and nothing else:
import { createEditor, document, paragraph, text, tableKit } from '@matrajs/core'
const editor = createEditor({
extensions: [document, paragraph, text, ...tableKit],
element: document.querySelector('#editor'),
}) document, paragraph and text are the floor. Every document
is a document holding blocks, and a table cell holds blocks, so a table without
them has nothing legal to contain.
The array is the whole feature list, and it is also the bundle. Extensions you do not import are not in the build · that is ordinary tree-shaking, not a plugin system, which is why the gzipped figures add rather than multiply.
Kits
A kit is an array of definitions, spread with .... Nothing more · there is no
configuration object and no ordering rule.
| Kit | Holds |
|---|---|
columnsKit | columnList column |
detailsKit | details detailsSummary |
starterKit | document paragraph text heading blockquote codeBlock bulletList orderedList listItem horizontalRule hardBreak bold italic strike code link history |
tableKit | table tableRow tableCell tableHeader |
Nodes 36
Blocks and inline elements the document is made of.
-
blockquote0.33 kB parses blockquote · renders blockquote -
bulletList0.49 kB parses ul · renders ul -
callout0.64 kB A callout — a Notion block, an admonition, an aside with a colour. -
codeBlock0.14 kB parses pre · renders pre -
column0.04 kB One column of a column list. Holds blocks, so a column can carry a list, a table or an image rather than only text. -
columnList0.66 kB Side-by-side columns. -
details0.57 kB A collapsible block — a Notion toggle, an HTML `<details>`. -
detailsSummary0.03 kB The title line of a toggle. -
document -
embed1.04 kB Anything with an embed page, in a frame. -
field0.55 kB A blank in a template. -
footnote0 kB The note itself: blocks, under the id its marker carries. -
footnoteRef0 kB The marker in the text. -
footnotes0.04 kB The list the notes live in, kept as the last block by `insertFootnote`. -
footnotesKit0 kB Footnotes: a marker in the text, a note at the end, numbered by position. -
hardBreak0.06 kB parses br · renders br -
hashtag0.24 kB A hashtag, as a node rather than styled text. -
heading0 kB parses h1, h2, h3, h4, h5, h6 · renders h1 -
horizontalRule0.07 kB parses hr · renders hr -
image0.2 kB parses img[src] · renders img -
listItem0.51 kB parses li · renders li -
mathBlock0.42 kB A formula on a line of its own. -
mathInline0.79 kB A formula in the run of text. -
mathKit0.79 kB Both nodes, sharing one renderer. -
mention0.21 kB A mention, as a node rather than styled text. -
orderedList0.55 kB parses ol · renders ol -
pageBreak0.07 kB A page break. -
paragraphparses p · renders p -
table1.84 kB parses table · renders table -
tableCell0.19 kB parses td · renders td -
tableHeader0.19 kB parses th · renders th -
tableRow0.04 kB parses tr · renders tr -
taskItem0.92 kB parses li[data-checked] · renders li -
taskList0.57 kB A checklist. -
text -
youtube0.77 kB A YouTube video, embedded.
Marks 12
Formatting applied across a range of text.
-
bold0.13 kB parses strong, b, [style: font-weight] · renders strong -
code0.05 kB parses code · renders code -
comment0.33 kB Threaded comments, anchored to ranges. -
highlight0.15 kB parses mark · renders mark -
italic0.08 kB parses em, i, [style: font-style] · renders em -
kbd0.05 kB A key on the keyboard, as in "press <kbd>Ctrl</kbd>". -
link0.23 kB parses a[href] · renders a -
strike0.08 kB parses s, del, [style: text-decoration] · renders s -
subscript0.05 kB parses sub · renders sub -
superscript0.05 kB parses sup · renders sup -
textStyle0.6 kB Colour, background, font family and font size, as one mark. -
underline0.07 kB parses u, [style: text-decoration] · renders u
Behaviour 33
No node or mark of their own · they add commands, keys or decorations.
-
autolink0.35 kB URLs become links as they are typed and as they are pasted. -
autosave0.81 kB Save the document once typing pauses. -
blockColor0.37 kB Colour on the block itself, the way Notion means it. -
bubbleMenu0.65 kB A menu that appears over the selection. -
characterCount0.28 kB Live character and word counts, with an optional hard limit. -
clearFormatting0.24 kB Back to plain text: every mark off the selection, every block a paragraph. -
codeHighlight0.63 kB Syntax highlighting for code blocks, as decorations. -
coreThe primitives every editor needs, exposed as commands. -
dictation0.85 kB Speak, and the words arrive at the caret. -
dragHandle1.01 kB A grip that appears beside the block under the pointer, and drags it. -
emoji0.94 kB Emoji as you type: `:tada:` becomes 🎉 the moment the closing colon lands. -
fileHandler0.14 kB Files dropped on or pasted into the editor. -
floatingMenu0.67 kB A menu that appears on an empty line. -
focus0.15 kB A class on the block the caret is in. -
ghostText0.71 kB Inline completion: grey text after the caret, Tab to take it. -
history0.07 kB Undo and redo as commands, for toolbars. -
imageResize0.81 kB A drag handle on every image, and a `width` attribute to remember it by. -
indent0.45 kB Block indentation, the way a word processor does it. -
invisibleCharacters0.72 kB Spaces, paragraph ends and line breaks, made visible. -
lineHeight0.36 kB Line height as an attribute on existing blocks. -
locked0.8 kB Blocks that refuse to change. -
placeholder0.27 kB Prompt text for an empty editor. -
search1.37 kB Find and replace. -
selectionHighlight0.81 kB Every other occurrence of the selected word, highlighted. -
smartPaste1.76 kB Paste what was meant, not what was copied. -
suggestion0.54 kB -
textAlign0.36 kB Alignment as an attribute on existing blocks. -
textDirection0.68 kB Text direction as an attribute on existing blocks, detected when unset. -
textTransform0.96 kB Change the case of the selection, or of the word under the caret. -
trailingNode0.08 kB Always a paragraph at the end of the document. -
typewriter0.68 kB The line being written stays put; the page moves under it. -
typography0.2 kB -
uniqueId0.18 kB Declare the attribute so the schema keeps it.
Generated from @matrajs/core by node scripts/extension-api.mjs.
The whole reference as one document, for tools that would rather fetch once, is at llms-full.txt.