Steven Fukase 4 tahun lalu
induk
melakukan
1de3972639

+ 0 - 1
packages/app/src/components/PageEditor/CodeMirrorEditor.jsx

@@ -201,7 +201,6 @@ export default class CodeMirrorEditor extends AbstractEditor {
   }
   }
 
 
   async initTextlintSettings() {
   async initTextlintSettings() {
-    await this.props.retrieveEditorSettings();
     // If database has empty array, pass null instead to enable all default rules
     // If database has empty array, pass null instead to enable all default rules
     const rulesForValidator = this.props.textlintRules?.length !== 0 ? this.props.textlintRules : null;
     const rulesForValidator = this.props.textlintRules?.length !== 0 ? this.props.textlintRules : null;
     this.textlintValidator = createValidator(rulesForValidator);
     this.textlintValidator = createValidator(rulesForValidator);

+ 4 - 1
packages/app/src/components/PageEditor/Editor.jsx

@@ -48,6 +48,10 @@ class Editor extends AbstractEditor {
     this.renderDropzoneOverlay = this.renderDropzoneOverlay.bind(this);
     this.renderDropzoneOverlay = this.renderDropzoneOverlay.bind(this);
   }
   }
 
 
+  componentWillMount() {
+    this.props.editorContainer.retrieveEditorSettings();
+  }
+
   componentDidMount() {
   componentDidMount() {
     this.setState({ isComponentDidMount: true });
     this.setState({ isComponentDidMount: true });
   }
   }
@@ -320,7 +324,6 @@ class Editor extends AbstractEditor {
                         editorOptions={editorContainer.state.editorOptions}
                         editorOptions={editorContainer.state.editorOptions}
                         isTextlintEnabled={editorContainer.state.isTextlintEnabled}
                         isTextlintEnabled={editorContainer.state.isTextlintEnabled}
                         textlintRules={editorContainer.state.textlintRules}
                         textlintRules={editorContainer.state.textlintRules}
-                        retrieveEditorSettings={editorContainer.retrieveEditorSettings}
                         onPasteFiles={this.pasteFilesHandler}
                         onPasteFiles={this.pasteFilesHandler}
                         onDragEnter={this.dragEnterHandler}
                         onDragEnter={this.dragEnterHandler}
                         onMarkdownHelpButtonClicked={this.showMarkdownHelp}
                         onMarkdownHelpButtonClicked={this.showMarkdownHelp}