Fix editorState bug

This commit is contained in:
cyril lopez 2018-03-12 16:05:36 +01:00
parent fb70b174d2
commit adb104f666
3 changed files with 6 additions and 6 deletions

View File

@ -224,7 +224,7 @@ class Wysiwyg extends React.Component {
render() {
const { editorState } = this.state;
console.log(this )
if (this.state.toggleFullScreen) {
return (
<div className={styles.fullscreenOverlay} onClick={this.toggleFullScreen}>
@ -273,7 +273,6 @@ class Wysiwyg extends React.Component {
setRef={(editor) => this.domEditor = editor}
spellCheck
/>
<input className={styles.editorInput} value="" tabIndex="-1" />
</div>
</div>
<div
@ -292,10 +291,11 @@ class Wysiwyg extends React.Component {
</div>
<div className={styles.editor}>
<WysiwygEditor
editorState={cloneDeep(editorState)}
// TODO handle preview
editorState={EditorState.createEmpty()}
onChange={() => {}}
placeholder={this.props.placeholder}
tabIndex="-1"
setRef={(dummyEditor) => this.dummyEditor = dummyEditor}
/>
</div>
</div>

View File

@ -111,4 +111,4 @@
"webpack-hot-middleware": "^2.18.2",
"whatwg-fetch": "^2.0.3"
}
}
}

View File

@ -48,4 +48,4 @@
"npm": ">= 3.0.0"
},
"license": "MIT"
}
}