DraftJS

Decorators

Make sure to apply decorators before the content
1
const [editorState, setEditorState] = useState(() =>
2
EditorState.createWithContent(
3
props.defaultContent,
4
decorators
5
)
6
);
7
8
return (
9
<Editor
10
editorState={editorState}
11
/>
12
);
Copied!

draft-js-plugins

draft-js-side-toolbar-plugin

Cons:
  • You can't optionally change one of style of theme.
    • You have to change them all.
    • You can reuse the css if you go into the package and find the class names.

Code Reference

Main Site

GitHub

Keyboard