diff --git a/app/components/SimpleEditor/panes/Notes/Notes.js b/app/components/SimpleEditor/panes/Notes/Notes.js index dbd6045156d69c93a2f06b4a50265839f95a4d30..ccb6c44bd4bcb2ccc0aedca692815a010711ff6d 100644 --- a/app/components/SimpleEditor/panes/Notes/Notes.js +++ b/app/components/SimpleEditor/panes/Notes/Notes.js @@ -16,8 +16,6 @@ class Notes extends Component { } didMount () { - const provider = this.getProvider() - // provider.config.miniEditorSession.onUpdate('', this.saveNotes, this) this.context.editorSession.onUpdate('document', this.onNotesUpdated, this) } @@ -94,32 +92,6 @@ class Notes extends Component { } } - saveNotes (source) { - const provider = this.getProvider() - const surface = this.getSurface() - // For some reason the first character is not in the annotation so it is not getting saved - // so we rerender the Surface - // surface.rerender() - const notes = provider.computeEntries() - const configurator = new Configurator().import(config) - const exporter = new SimpleExporter(configurator.config) - - forEach(notes.main, function (mainNote) { - forEach(notes.mini, function (miniNote) { - if (miniNote.parentNoteId === mainNote.id) { - const exportedNode = exporter.convertNode(miniNote) - this.context.editorSession.transaction(function (tx, args) { - const path = [mainNote.id, 'note-content'] - tx.set(path, exportedNode.outerHTML) - }) - } - }.bind(this)) - }.bind(this)) - - return new Promise(function (resolve, reject) { - resolve() - }) - } getProvider () { return this.context.notesProvider }