Every extension
footnotes
The list the notes live in, kept as the last block by `insertFootnote`.
Adding it
import { createEditor, document, paragraph, text, footnotes } from '@matrajs/core'
const editor = createEditor({
extensions: [document, paragraph, text, footnotes],
element: document.querySelector('#editor'),
})
There is no separate package · footnotes is already in @matrajs/core, and an extension you do not import is not in your bundle. document, paragraph and text are the floor every document needs.
HTML
-
Parses
ol[data-footnotes] -
Renders
ol
Styles
This one needs a stylesheet to look right, and ships the minimum as a string rather than a file · nothing is loaded unless you load it.
import { footnotesCSS } from '@matrajs/core'
const style = document.createElement('style')
style.textContent = footnotesCSS
document.head.append(style)