diff --git a/examples/draft-0-10-0/plaintext/plaintext.html b/examples/draft-0-10-0/plaintext/plaintext.html index 3e8f0c4fb7..61275df021 100644 --- a/examples/draft-0-10-0/plaintext/plaintext.html +++ b/examples/draft-0-10-0/plaintext/plaintext.html @@ -35,12 +35,15 @@ constructor(props) { super(props); this.state = {editorState: EditorState.createEmpty()}; - - this.focus = () => this.refs.editor.focus(); this.onChange = (editorState) => this.setState({editorState}); this.logState = () => console.log(this.state.editorState.toJS()); + this.setDomEditorRef = ref => this.domEditor = ref; } - + + componentDidMount(){ + this.domEditor.focus() + } + render() { return (