A DraftJS plugin for supporting Markdown syntax shortcuts
This plugin works with DraftJS Plugins wrapper component.
npm i --save draft-js-markdown-shortcuts-pluginthen import from your editor component
importcreateMarkdownShortcutsPluginfrom'draft-js-markdown-shortcuts-plugin';importReact,{Component}from'react';importEditorfrom'draft-js-plugins-editor';importcreateMarkdownShortcutsPluginfrom'draft-js-markdown-shortcuts-plugin';import{EditorState}from'draft-js';constplugins=[createMarkdownShortcutsPlugin()];exportdefaultclassDemoEditorextendsComponent{state={editorState: EditorState.createEmpty(),};onChange=(editorState)=>{this.setState({
editorState,});};render(){return(<EditoreditorState={this.state.editorState}onChange={this.onChange}plugins={plugins}/>);}}MIT. See LICENSE
