X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/61343b82c4f0da4c68e4c6373daafff4a81efdd1..e08b42e8ad054ec67522d7ac1aaae5dc68cb3d01:/wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin_src.js diff --git a/wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin_src.js b/wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin_src.js index 4618fcfe..27f0f7d5 100644 --- a/wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin_src.js +++ b/wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin_src.js @@ -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'} ); }); @@ -35,11 +36,11 @@ 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; @@ -145,21 +146,21 @@ 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 @@ -169,7 +170,7 @@ }); } - // 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); },