Skip to content
Snippets Groups Projects
Commit bdb19d07 authored by chris's avatar chris Committed by john
Browse files

kill NotesEditorContext

parent 4f82acde
No related branches found
No related tags found
No related merge requests found
...@@ -253,9 +253,7 @@ class Editor extends ProseEditor { ...@@ -253,9 +253,7 @@ class Editor extends ProseEditor {
// }) // })
// notes provider // notes provider
const notesProvider = new NotesProvider(doc, { const notesProvider = new NotesProvider(doc)
notesEditorContext: ''
})
// comments provider // comments provider
const commentsProvider = new CommentsProvider(doc, { const commentsProvider = new CommentsProvider(doc, {
......
...@@ -14,9 +14,8 @@ class NotesEditor extends ProseEditor { ...@@ -14,9 +14,8 @@ class NotesEditor extends ProseEditor {
didMount () { didMount () {
const provider = this.getProvider() const provider = this.getProvider()
provider.config.notesEditorContext = this.getChildContext()
this.editorSession.onUpdate('document', this.findNote, this) this.editorSession.onUpdate('document', this.findNote, this)
this.on('noteSelected', this.scrollTo, this) provider.on('noteSelected', this.scrollTo, this)
} }
getInitialState () { getInitialState () {
...@@ -98,7 +97,7 @@ class NotesEditor extends ProseEditor { ...@@ -98,7 +97,7 @@ class NotesEditor extends ProseEditor {
return c.parentNoteId === nodeId return c.parentNoteId === nodeId
}) })
this.refs.notesEditorContentPanel.scrollTo(note.id) if (note) this.refs.notesEditorContentPanel.scrollTo(note.id)
} }
saveNote (isolatedNote) { saveNote (isolatedNote) {
......
...@@ -45,12 +45,7 @@ class NotesProvider extends TOCProvider { ...@@ -45,12 +45,7 @@ class NotesProvider extends TOCProvider {
} }
calloutSelected (noteId) { calloutSelected (noteId) {
const notesEditor = this.getNotesEditor() this.emit('noteSelected', noteId)
notesEditor.emit('noteSelected', noteId)
}
getNotesEditor () {
return this.config.notesEditorContext.editor
} }
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment