DraftJS Blockquote Plugin
This is a plugin for the @draft-js-plugins/editor
.
Feature
- Press enter to insert new line in the same block
TODO
- [ ] Support depth value
- [ ] Press tab or shift+tab to adjust the depth
Usage
import { EditorState } from 'draft-js';
import Editor from '@draft-js-plugins/editor';
import createBlockquotePlugin from '@draft-js-enhance-plugins/blockquote';
const blockquotePlugin = createBlockquotePlugin();
const plugins = [blockquotePlugin];
function Example() {
const [editorState, setEditorState] = useState(EditorState.createEmpty());
return (
<Editor
editorState={editorState}
onChange={setEditorState}
plugins={plugins}
/>
);
}