From: Coleman Watts Date: Tue, 18 Aug 2015 01:42:54 +0000 (-0400) Subject: Move CKEDITOR related code to crm.ckeditor.js X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=9cc08ac20b303567ced78dd1c7a2ef82eb0f7b3e;p=civicrm-core.git Move CKEDITOR related code to crm.ckeditor.js --- diff --git a/js/Common.js b/js/Common.js index 6a49f0629a..d84b3fecd7 100644 --- a/js/Common.js +++ b/js/Common.js @@ -1315,15 +1315,6 @@ if (!CRM.vars) CRM.vars = {}; messagesFromMarkup.call($('#crm-container')); } - // Hide CiviCRM menubar when editor is fullscreen - if (window.CKEDITOR) { - CKEDITOR.on('instanceCreated', function (e) { - e.editor.on('maximize', function (e) { - $('#civicrm-menu').toggle(e.data === 2); - }); - }); - } - $('body') // bind the event for image popup .on('click', 'a.crm-image-popup', function(e) { diff --git a/js/wysiwyg/crm.ckeditor.js b/js/wysiwyg/crm.ckeditor.js index 5d418e57b3..18677de696 100644 --- a/js/wysiwyg/crm.ckeditor.js +++ b/js/wysiwyg/crm.ckeditor.js @@ -41,6 +41,10 @@ editor.on('pasteState', function() { $(item).trigger("paste"); }); + // Hide CiviCRM menubar when editor is fullscreen + editor.on('maximize', function (e) { + $('#civicrm-menu').toggle(e.data === 2); + }); } }; CRM.wysiwyg.destroy = function(item) {