]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin_src.js
WordPress 3.8-scripts
[autoinstalls/wordpress.git] / wp-includes / js / tinymce / plugins / wpfullscreen / editor_plugin_src.js
index 4618fcfe6729e4583a15e602578b12c337ad8ff9..27f0f7d530aaf56518e39eba73c02085e056ff0d 100644 (file)
@@ -1,3 +1,4 @@
+/* global tinymce:false, switchEditors, fullscreen */
 /**
  * WP Fullscreen TinyMCE plugin
  *
@@ -8,26 +9,26 @@
        tinymce.create('tinymce.plugins.wpFullscreenPlugin', {
                resize_timeout: false,
 
-               init : function(ed, url) {
-                       var t = this, oldHeight = 0, s = {}, DOM = tinymce.DOM;
+               init : function( ed ) {
+                       var t = this, s = {}, DOM = tinymce.DOM;
 
                        // Register commands
                        ed.addCommand('wpFullScreenClose', function() {
-                               // this removes the editor, content has to be saved first with tinyMCE.execCommand('wpFullScreenSave');
+                               // this removes the editor, content has to be saved first with tinymce.execCommand('wpFullScreenSave');
                                if ( ed.getParam('wp_fullscreen_is_enabled') ) {
                                        DOM.win.setTimeout(function() {
-                                               tinyMCE.remove(ed);
+                                               tinymce.remove(ed);
                                                DOM.remove('wp_mce_fullscreen_parent');
-                                               tinyMCE.settings = tinyMCE.oldSettings; // Restore old settings
+                                               tinymce.settings = tinymce.oldSettings; // Restore old settings
                                        }, 10);
                                }
                        });
 
                        ed.addCommand('wpFullScreenSave', function() {
-                               var ed = tinyMCE.get('wp_mce_fullscreen'), edd;
+                               var ed = tinymce.get('wp_mce_fullscreen'), edd;
 
                                ed.focus();
-                               edd = tinyMCE.get( ed.getParam('wp_fullscreen_editor_id') );
+                               edd = tinymce.get( ed.getParam('wp_fullscreen_editor_id') );
 
                                edd.setContent( ed.getContent({format : 'raw'}), {format : 'raw'} );
                        });
                        ed.addCommand('wpFullScreenInit', function() {
                                var d, b, fsed;
 
-                               ed = tinyMCE.activeEditor;
+                               ed = tinymce.activeEditor;
                                d = ed.getDoc();
                                b = d.body;
 
-                               tinyMCE.oldSettings = tinyMCE.settings; // Store old settings
+                               tinymce.oldSettings = tinymce.settings; // Store old settings
 
                                tinymce.each(ed.settings, function(v, n) {
                                        s[n] = v;
@@ -67,7 +68,7 @@
                                                edd.setContent( switchEditors.wpautop( edd.getElement().value ) );
 
                                        setTimeout(function(){ // add last
-                                               edd.onNodeChange.add(function(ed, cm, e){
+                                               edd.onNodeChange.add( function() {
                                                        tinymce.each(buttons, function(c) {
                                                                var btn, cls;
 
                                                ed.dom.win.scrollTo(0, y);
                                        }, 40);
                                }
-                       };
+                       }
 
                        // Add appropriate listeners for resizing content area
-                       ed.onInit.add(function(ed, l) {
+                       ed.onInit.add( function( ed ) {
                                ed.onChange.add(resize);
                                ed.onSetContent.add(resize);
                                ed.onPaste.add(resize);
                                ed.onKeyUp.add(resize);
                                ed.onPostRender.add(resize);
 
-                               ed.getBody().style.overflowY = "hidden";
+                               ed.getBody().style.overflowY = 'hidden';
                        });
 
                        if ( ed.getParam('autoresize_on_init', true) ) {
-                               ed.onLoadContent.add(function(ed, l) {
+                               ed.onLoadContent.add( function() {
                                        // Because the content area resizes when its content CSS loads,
                                        // and we can't easily add a listener to its onload event,
                                        // we'll just trigger a resize after a short loading period
                                });
                        }
 
-                       // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample');
+                       // Register the command so that it can be invoked by using tinymce.activeEditor.execCommand('mceExample');
                        ed.addCommand('wpAutoResize', resize);
                },