packages/footnote/README.md
Footnote plugins for Plate.
This package adds dedicated footnote reference and footnote definition nodes, plus transforms and queries for inserting, resolving, navigating, and repairing footnotes.
npm install @platejs/footnote @platejs/markdown remark-gfm
import {
FootnoteDefinitionPlugin,
FootnoteReferencePlugin,
} from '@platejs/footnote/react';
import { MarkdownPlugin } from '@platejs/markdown';
import { createPlateEditor } from 'platejs/react';
import remarkGfm from 'remark-gfm';
const editor = createPlateEditor({
plugins: [
FootnoteReferencePlugin,
FootnoteDefinitionPlugin,
MarkdownPlugin.configure({
options: {
remarkPlugins: [remarkGfm],
},
}),
],
});
Queries:
api.footnote.nextIdapi.footnote.definitionapi.footnote.definitionsapi.footnote.definitionTextapi.footnote.duplicateDefinitionsapi.footnote.duplicateIdentifiersapi.footnote.hasDuplicateDefinitionsapi.footnote.isDuplicateDefinitionapi.footnote.isResolvedapi.footnote.referencesTransforms:
tf.insert.footnotetf.footnote.createDefinitiontf.footnote.focusDefinitiontf.footnote.focusReferencetf.footnote.normalizeDuplicateDefinition