draft-js-lister-plugin
v1.0.1
Published
Adds support for automatic `ul` and `ol` in your `draft-js-plugins` `<Editor />`!
Readme
draft-js-lister-plugin
Adds support for automatic ul and ol in your draft-js-plugins <Editor />!

Support
- Starting a line with
-or*and space afterwards, creates a newul. - Starting a line with a
<NUMBER>.<SPACE>creates a newol. - Pasting from text editors works too
Installation :hamburger:
npm install --save draft-js-lister-pluginUsage:
import React from 'react';
import Editor from 'draft-js-plugins-editor';
import createListerPlugin from 'draft-js-lister-plugin';
const listerPlugin = createListerPlugin();
const MyEditor = ({ editorState, onChange }) => (
<div>
<Editor
editorState={ editorState }
onChange={ onChange }
plugins={ [listerPlugin] }
/>
<EmojiSuggestions />
</div>
);
export default MyEditor;