slate-lists-plugin
v1.0.6
Published
a plugin for handling lists in Slate
Downloads
3
Readme
slate-lists-plugin
A plugin for Slate for handling keyboard events when in a list.
To use
import ListsPlugin from 'slate-lists-plugin';
const plugins = [
ListsPlugin(options)
]
Arguments
The list plugin takes an options object.
- types - an array of strings for the type of list e.g ['my-ordered-list', 'my-unordered-list']
- typeItem - a string of the type of a list item 'my-list-item'
Keys
Enter
will insert a new list itemEnter + shift
will allow for multi-line list itemsTab
will nest a list itemTab + shift
will un nest a list itemBackspace
will unwrap the list item if at the beginning of the item