slate-edit-footnote
v0.3.2
Published
A Slate plugin to work with footnote.
Keywords
Readme
slate-edit-footnote
A Slate plugin to handle footnote edition.
Install
npm install slate-edit-footnoteFeatures
- Normalize footnotes to be at end of the document
Simple Usage
import EditFootnote from 'slate-edit-footnote'
const plugins = [
EditFootnote()
]Arguments
[typeFootnote: String]— type for the footnote block[typeRef: String]— type for the footnote ref
Utilities and Transform
slate-edit-footnote exports utilities and transforms:
transforms.insertFootnote
plugin.transforms.insertFootnote(transform: Transform) => Transform
Insert a new empty footnote, with a reference at the current position.
plugin.isSelectionInFootnote(options, state)
Utilities to determine if the current selection in the provided state is
within a footnote. options is an object with a property typeFootnote which
defaults to footnote.

