|
@@ -114,6 +114,11 @@ export default class CodeMirrorEditor extends AbstractEditor {
|
|
|
this.emojiAutoCompleteHelper = new EmojiAutoCompleteHelper(this.props.emojiStrategy);
|
|
this.emojiAutoCompleteHelper = new EmojiAutoCompleteHelper(this.props.emojiStrategy);
|
|
|
this.setState({ isEnabledEmojiAutoComplete: true });
|
|
this.setState({ isEnabledEmojiAutoComplete: true });
|
|
|
}
|
|
}
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ componentDidMount() {
|
|
|
|
|
+ // ensure to be able to resolve 'this' to use 'codemirror.commands.save'
|
|
|
|
|
+ this.getCodeMirror().codeMirrorEditor = this;
|
|
|
|
|
|
|
|
// load theme
|
|
// load theme
|
|
|
const theme = this.props.editorOptions.theme;
|
|
const theme = this.props.editorOptions.theme;
|
|
@@ -124,11 +129,6 @@ export default class CodeMirrorEditor extends AbstractEditor {
|
|
|
this.setKeymapMode(keymapMode);
|
|
this.setKeymapMode(keymapMode);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- componentDidMount() {
|
|
|
|
|
- // ensure to be able to resolve 'this' to use 'codemirror.commands.save'
|
|
|
|
|
- this.getCodeMirror().codeMirrorEditor = this;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
componentWillReceiveProps(nextProps) {
|
|
componentWillReceiveProps(nextProps) {
|
|
|
// load theme
|
|
// load theme
|
|
|
const theme = nextProps.editorOptions.theme;
|
|
const theme = nextProps.editorOptions.theme;
|