From bf46eaa2d06fbdb69b26dab9ec0be9846541baa5 Mon Sep 17 00:00:00 2001 From: Alexey Neretin Date: Fri, 4 Aug 2017 15:28:25 +0300 Subject: [PATCH] Bug #148 from github was fixed / SCAYT leaves underlined word after CKEditor replace dialog corrects it. --- plugin.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/plugin.js b/plugin.js index a9b255d..4e9ebe1 100755 --- a/plugin.js +++ b/plugin.js @@ -1474,6 +1474,23 @@ CKEDITOR.on('dialogDefinition', function(dialogDefinitionEvent) { } }); } + + if (dialogName === 'replace') { + dialog.on('hide', function(hideEvent) { + var editor = hideEvent.sender && hideEvent.sender.getParentEditor(), + plugin = CKEDITOR.plugins.scayt, + scaytInstance = editor.scayt; + + if(editor) { + setTimeout(function() { + if(scaytInstance) { + scaytInstance.fire('removeMarkupInDocument', {}); + plugin.reloadMarkup(scaytInstance); + } + }, 0); + } + }); + } }); CKEDITOR.on('scaytReady', function() {