Slate plugin to ensure a trailing block.
npm install @wikifactory/slate-trailing-block
import TrailingBlock from 'slate-trailing-block'
const plugins = [
TrailingBlock({ type: 'paragraph' })
]
This plugin accepts options to redefine the following block types:
[type: String]
— type for the trailing block[match: Function]
— function that checks against the last node
slate-trailing-block
exports utilities and changes:
plugin.changes.focusAtEnd(editor: Editor) => Editor
Focus at the end of the last block.