import React from 'react' ; import { Editor , EditorState , getDefaultKeyBinding , RichUtils } from 'draft-js' ; import '../assets/StyleTextEditor.css' ; import '../../node_modules/draft-js/dist/Draft.css' ; class RichTextEditor extends React . Component { constructor (props) { super ( props ); this . state = {editorState: EditorState . createEmpty ()}; this . focus = () => this . refs . editor . focus (); this . onChange = (editorState) => this . setState ({ editorState }); this . handleKeyCommand = this . _handleKeyCommand . bind ( this ); ...
Comments
Post a Comment