|
|
@@ -9,7 +9,9 @@ import {
|
|
|
|
|
|
import Dropzone from 'react-dropzone';
|
|
|
|
|
|
+import AppContainer from '~/client/services/AppContainer';
|
|
|
import EditorContainer from '~/client/services/EditorContainer';
|
|
|
+import { withUnstatedContainers } from '../UnstatedUtils';
|
|
|
|
|
|
import Cheatsheet from './Cheatsheet';
|
|
|
import AbstractEditor from './AbstractEditor';
|
|
|
@@ -18,7 +20,7 @@ import TextAreaEditor from './TextAreaEditor';
|
|
|
|
|
|
import pasteHelper from './PasteHelper';
|
|
|
|
|
|
-export default class Editor extends AbstractEditor {
|
|
|
+class Editor extends AbstractEditor {
|
|
|
|
|
|
constructor(props) {
|
|
|
super(props);
|
|
|
@@ -317,6 +319,8 @@ export default class Editor extends AbstractEditor {
|
|
|
indentSize={editorContainer.state.indentSize}
|
|
|
editorOptions={editorContainer.state.editorOptions}
|
|
|
isTextlintEnabled={editorContainer.state.isTextlintEnabled}
|
|
|
+ textlintRules={editorContainer.state.textlintRules}
|
|
|
+ retrieveEditorSettings={editorContainer.retrieveEditorSettings}
|
|
|
onPasteFiles={this.pasteFilesHandler}
|
|
|
onDragEnter={this.dragEnterHandler}
|
|
|
onMarkdownHelpButtonClicked={this.showMarkdownHelp}
|
|
|
@@ -378,4 +382,8 @@ Editor.propTypes = Object.assign({
|
|
|
emojiStrategy: PropTypes.object,
|
|
|
onChange: PropTypes.func,
|
|
|
onUpload: PropTypes.func,
|
|
|
+ appContainer: PropTypes.instanceOf(AppContainer).isRequired,
|
|
|
+ editorContainer: PropTypes.instanceOf(EditorContainer).isRequired,
|
|
|
}, AbstractEditor.propTypes);
|
|
|
+
|
|
|
+export default withUnstatedContainers(Editor, [AppContainer, EditorContainer]);
|