new frontend API - getCurrentNoteContent and onNoteChange

This commit is contained in:
azivner
2018-09-03 16:05:28 +02:00
parent a3feaa13b3
commit c7a609e349
42 changed files with 817 additions and 106 deletions

View File

@@ -29,7 +29,7 @@ async function show() {
}
});
textEditor.model.document.on('change:data', noteDetailService.noteChanged);
onNoteChange(noteDetailService.noteChanged);
}
}
@@ -105,6 +105,10 @@ async function sendMarkdownDialog() {
$markdownImportTextarea.val('');
}
function onNoteChange(func) {
textEditor.model.document.on('change:data', func);
}
$markdownImportButton.click(sendMarkdownDialog);
$markdownImportDialog.bind('keydown', 'ctrl+return', sendMarkdownDialog);
@@ -115,5 +119,6 @@ export default {
show,
getEditor,
getContent,
focus
focus,
onNoteChange
}