From 21a96d27760c0c06578ac01e40500250d4119a16 Mon Sep 17 00:00:00 2001 From: azivner Date: Tue, 28 Aug 2018 00:21:43 +0200 Subject: [PATCH] listen to correct CKEditor event for data changes --- src/public/javascripts/services/note_detail_text.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/public/javascripts/services/note_detail_text.js b/src/public/javascripts/services/note_detail_text.js index 345cb3951..aff30b5fe 100644 --- a/src/public/javascripts/services/note_detail_text.js +++ b/src/public/javascripts/services/note_detail_text.js @@ -11,13 +11,7 @@ async function show() { textEditor = await BalloonEditor.create($noteDetailText[0], {}); - textEditor.model.document.on('change', () => { - // change is triggered on just marker/selection changes which is not interesting for us - if (textEditor.model.document.differ.getChanges().length > 0) { - noteDetailService.noteChanged(); - } - } - ); + textEditor.model.document.on('change:data', noteDetailService.noteChanged); } textEditor.setData(noteDetailService.getCurrentNote().content);