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

on minieditor change in document main's editors save gets trigered

parent 89e84648
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,6 @@ import {
BasePackage,
EmphasisPackage,
ParagraphPackage,
PersistencePackage,
ProseArticle,
StrongPackage,
SpellCheckPackage
......@@ -27,7 +26,6 @@ let config = {
config.import(ParagraphPackage)
config.import(EmphasisPackage)
config.import(StrongPackage)
config.import(PersistencePackage)
config.import(SpellCheckPackage)
config.import(CommentPackage)
config.import(IsolatedNote)
......
......@@ -16,14 +16,16 @@ class Notes extends Component {
}
// use toc:updated to avoid rewriting TOCProvider's this.handleDocumentChange
didMount () {
this.context.editorSession.onUpdate('document', this.onNotesUpdated, this)
const provider = this.getProvider()
this.context.editorSession.onUpdate('document', this.onNotesUpdated, this)
const notes = provider.computeEntries()
for (var i = 0; i < notes.main.length; i++) {
provider.createIsolatedNote(notes.main[i])
}
provider.config.miniEditorSession.onUpdate('document', this.saveNotes, this)
}
initResize (e) {
......@@ -85,6 +87,7 @@ class Notes extends Component {
}
saveNotes (source) {
console.log('save???')
const provider = this.getProvider()
const notes = provider.computeEntries()
let self = this
......
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