1.0.5 • Published 6 years ago
plugin-slate-lists v1.0.5
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
Enterwill insert a new list itemEnter + shiftwill allow for multi-line list itemsTabwill nest a list itemTab + shiftwill un nest a list itemBackspacewill unwrap the list item if at the beginning of the item