plugin-slate-lists

1.0.5 • Public • Published

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 item
  • Enter + shift will allow for multi-line list items
  • Tab will nest a list item
  • Tab + shift will un nest a list item
  • Backspace will unwrap the list item if at the beginning of the item

Readme

Keywords

none

Package Sidebar

Install

npm i plugin-slate-lists

Weekly Downloads

0

Version

1.0.5

License

ISC

Unpacked Size

77.9 kB

Total Files

16

Last publish

Collaborators

  • phoebeg