Move CKEDITOR related code to crm.ckeditor.js
authorColeman Watts <coleman@civicrm.org>
Tue, 18 Aug 2015 01:42:54 +0000 (21:42 -0400)
committerColeman Watts <coleman@civicrm.org>
Tue, 18 Aug 2015 01:42:54 +0000 (21:42 -0400)
js/Common.js
js/wysiwyg/crm.ckeditor.js

index 6a49f0629aa9d5d70bd8929a247f41d855056751..d84b3fecd73bdad79b5e4ee3e1c24f340a2e7932 100644 (file)
@@ -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) {
index 5d418e57b39a93cb942ebf42eab332c54918e72c..18677de696489fefbcd164fa6e1eaaa1554dc992 100644 (file)
       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) {