diff --git a/app/components/SimpleEditor/Editor.js b/app/components/SimpleEditor/Editor.js index 87d1d9125c4648d8022fbacc39b63c2eb518eb39..88a783a2638142e559ec2906462b37d67a69bce6 100644 --- a/app/components/SimpleEditor/Editor.js +++ b/app/components/SimpleEditor/Editor.js @@ -193,6 +193,7 @@ class Editor extends ProseEditor { const configurator = this.props.configurator const editing = this.props.disabled ? 'selection' : 'full' return $$(ContainerEditor, { + disabled: this.props.disabled, editing: editing, editorSession: this.editorSession, commands: configurator.getSurfaceCommandNames(), diff --git a/app/components/SimpleEditor/elements/isolatedNote/IsolatedNoteComponent.js b/app/components/SimpleEditor/elements/isolatedNote/IsolatedNoteComponent.js index b76cca0199776312e6720f028e2dbea3102ea0c6..0ad0e0f95ec683367ab484e9c4f529e7e4cfc6cf 100644 --- a/app/components/SimpleEditor/elements/isolatedNote/IsolatedNoteComponent.js +++ b/app/components/SimpleEditor/elements/isolatedNote/IsolatedNoteComponent.js @@ -7,7 +7,7 @@ class IsolatedNoteComponent extends BlockNodeComponent { el.append( $$(TextPropertyEditor, { path: [this.props.node.id, 'content'], - disabled: this.props.disabled, + disabled: this.context.editor.props.disabled, tagName: 'p', multiLine: true }).ref('noteContentEditor-' + this.props.node.id)) diff --git a/app/components/SimpleEditor/elements/track_change/TrackChangeComponent.js b/app/components/SimpleEditor/elements/track_change/TrackChangeComponent.js index f68e10780016784208338f754c41f767ff2a6aa5..13053847f1f69e5f26ce68f3e9ab6db6473f4faa 100644 --- a/app/components/SimpleEditor/elements/track_change/TrackChangeComponent.js +++ b/app/components/SimpleEditor/elements/track_change/TrackChangeComponent.js @@ -52,6 +52,7 @@ class TrackChangeComponent extends AnnotationComponent { el.addClass('sc-track-change-' + status) if (viewMode === false) { + console.log('status', status) if (status === 'delete') el.addClass('sc-track-delete-hide') if (status === 'add') el.addClass('sc-track-add-show') } diff --git a/app/components/SimpleEditor/miniEditor/miniEditor.js b/app/components/SimpleEditor/miniEditor/miniEditor.js index b4e91a6a69f9f4d0a01b7a65dc4e8bc28174a58d..025b1e93e79aa19c52a8ea6b4a5c8dbe97c06582 100644 --- a/app/components/SimpleEditor/miniEditor/miniEditor.js +++ b/app/components/SimpleEditor/miniEditor/miniEditor.js @@ -67,6 +67,7 @@ class MiniEditor extends ProseEditor { comments: this.props.comments, containerId: this.props.containerId, editorSession: this.editorSession, + disabled: this.props.disabled, fragment: this.props.fragment, spellcheck: 'native', trackChanges: this.props.trackChanges, diff --git a/app/components/SimpleEditor/panes/Notes/Notes.js b/app/components/SimpleEditor/panes/Notes/Notes.js index e1a95046158bed4d5f74642d5a52a82580fa3264..a044440df3f7f1aa81df9564783021823dc17056 100644 --- a/app/components/SimpleEditor/panes/Notes/Notes.js +++ b/app/components/SimpleEditor/panes/Notes/Notes.js @@ -49,10 +49,12 @@ class Notes extends Component { const user = this.getUser() const update = this.getUpdate() const trackChanges = this.trackChanges() + const disabled = this.isInReadOnlyMode() el.append($$(MiniEditor, { comments: comments, containerId: 'mini', + disabled: disabled, editorSession: miniEditorSession, fragment: fragment, trackChanges: trackChanges, @@ -125,6 +127,10 @@ class Notes extends Component { return this.context.editor.props.user } + isInReadOnlyMode () { + return this.context.editor.props.disabled + } + getFragment () { return this.context.editor.props.fragment }