1.0.0 • Published 2 years ago
@draft-js-enhance-plugins/markdown-convert v1.0.0
DraftJS Markdown Convert Plugin
This is a plugin for the @draft-js-plugins/editor
.
Feature
Markdown syntax shortcuts supported.
TODO
- Support links syntax
- Support images syntax
Usage
import { EditorState } from 'draft-js';
import Editor from '@draft-js-plugins/editor';
import createMarkdownConvertPlugin from '@draft-js-enhance-plugins/markdown-convert';
const markdownConvertPlugin = createMarkdownConvertPlugin();
const plugins = [markdownConvertPlugin];
function Example() {
const [editorState, setEditorState] = useState(EditorState.createEmpty());
return (
<Editor
editorState={editorState}
onChange={setEditorState}
plugins={plugins}
/>
);
}
1.0.0
2 years ago