Changeset 26214
- Timestamp:
- 11/15/2013 03:04:04 PM (12 years ago)
- Location:
- trunk/src/wp-includes/js/tinymce/plugins
- Files:
-
- 5 edited
-
wordpress/editor_plugin_src.js (modified) (6 diffs)
-
wpdialogs/editor_plugin_src.js (modified) (1 diff)
-
wpeditimage/editor_plugin_src.js (modified) (7 diffs)
-
wpfullscreen/editor_plugin_src.js (modified) (8 diffs)
-
wpgallery/editor_plugin_src.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js
r25132 r26214 1 /* global tinymce, getUserSetting, setUserSetting, switchEditors, autosave */ 1 2 /** 2 3 * WordPress plugin. … … 143 144 }); 144 145 145 ed.onExecCommand.add( function( ed, cmd , ui, val) {146 ed.onExecCommand.add( function( ed, cmd ) { 146 147 if ( tinymce.isWebKit && style && ( 'InsertUnorderedList' == cmd || 'InsertOrderedList' == cmd ) ) 147 148 ed.dom.remove( style ); … … 222 223 last = k; 223 224 }); 224 } ;225 } 225 226 226 227 // keep empty paragraphs :( … … 292 293 // popup buttons for images and the gallery 293 294 ed.onInit.add(function(ed) { 294 tinymce.dom.Event.add(ed.getWin(), 'scroll', function( e) {295 tinymce.dom.Event.add(ed.getWin(), 'scroll', function() { 295 296 ed.plugins.wordpress._hideButtons(); 296 297 }); 297 tinymce.dom.Event.add(ed.getBody(), 'dragstart', function( e) {298 tinymce.dom.Event.add(ed.getBody(), 'dragstart', function() { 298 299 ed.plugins.wordpress._hideButtons(); 299 300 }); 300 301 }); 301 302 302 ed.onBeforeExecCommand.add( function(ed, cmd, ui, val) {303 ed.onBeforeExecCommand.add( function( ed ) { 303 304 ed.plugins.wordpress._hideButtons(); 304 305 }); 305 306 306 ed.onSaveContent.add( function(ed, o) {307 ed.onSaveContent.add( function( ed ) { 307 308 ed.plugins.wordpress._hideButtons(); 308 309 }); … … 326 327 } 327 328 } 328 } 329 }; 329 330 330 331 // close popups when clicking on the background … … 362 363 363 364 _showButtons : function(n, id) { 364 var ed = tiny MCE.activeEditor, p1, p2, vp, DOM = tinymce.DOM, X, Y;365 var ed = tinymce.activeEditor, p1, p2, vp, DOM = tinymce.DOM, X, Y; 365 366 366 367 vp = ed.dom.getViewPort(ed.getWin()); -
trunk/src/wp-includes/js/tinymce/plugins/wpdialogs/editor_plugin_src.js
r23425 r26214 1 /** 2 * editor_plugin_src.js 3 * 4 * Copyright 2009, Moxiecode Systems AB 5 * Released under LGPL 6 * 7 * License: http://tinymce.moxiecode.com/license 8 * Contributing: http://tinymce.moxiecode.com/contributing 9 */ 10 1 /* global tinymce */ 11 2 (function() { 12 3 tinymce.create('tinymce.plugins.WPDialogs', { 13 init : function( ed, url) {4 init : function( ed ) { 14 5 tinymce.create('tinymce.WPWindowManager:tinymce.InlineWindowManager', { 15 6 WPWindowManager : function(ed) { -
trunk/src/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin_src.js
r25921 r26214 1 1 /* global tinymce */ 2 2 (function() { 3 var mouse = {}; 4 3 5 tinymce.create('tinymce.plugins.wpEditImage', { 4 6 url: '', … … 6 8 7 9 init: function(ed, url) { 8 var t = this , mouse = {};10 var t = this; 9 11 10 12 t.url = url; … … 28 30 // when pressing Return inside a caption move the caret to a new parapraph under it 29 31 ed.dom.events.add(ed.getBody(), 'keydown', function(e) { 30 var n, DL, DIV, P , content;32 var n, DL, DIV, P; 31 33 32 34 if ( e.keyCode == 13 ) { … … 106 108 // When inserting content, if the caret is inside a caption create new paragraph under 107 109 // and move the caret there 108 ed.onBeforeExecCommand.add( function(ed, cmd, ui, val) {110 ed.onBeforeExecCommand.add( function( ed, cmd ) { 109 111 var node, p; 110 112 … … 228 230 }); 229 231 230 tinymce.dom.Event.add(editButton, 'mousedown', function( e) {232 tinymce.dom.Event.add(editButton, 'mousedown', function() { 231 233 t._editImage(); 232 234 ed.plugins.wordpress._hideButtons(); … … 241 243 }); 242 244 243 tinymce.dom.Event.add(dellButton, 'mousedown', function( e) {245 tinymce.dom.Event.add(dellButton, 'mousedown', function() { 244 246 var ed = tinymce.activeEditor, el = ed.selection.getNode(), parent; 245 247 … … 318 320 authorurl : 'http://wordpress.org', 319 321 infourl : '', 320 version : "1.0"322 version : '1.0' 321 323 }; 322 324 } -
trunk/src/wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin_src.js
r23425 r26214 1 /* global tinymce:false, switchEditors, fullscreen */ 1 2 /** 2 3 * WP Fullscreen TinyMCE plugin … … 9 10 resize_timeout: false, 10 11 11 init : function( ed, url) {12 var t = this, oldHeight = 0,s = {}, DOM = tinymce.DOM;12 init : function( ed ) { 13 var t = this, s = {}, DOM = tinymce.DOM; 13 14 14 15 // Register commands 15 16 ed.addCommand('wpFullScreenClose', function() { 16 // this removes the editor, content has to be saved first with tiny MCE.execCommand('wpFullScreenSave');17 // this removes the editor, content has to be saved first with tinymce.execCommand('wpFullScreenSave'); 17 18 if ( ed.getParam('wp_fullscreen_is_enabled') ) { 18 19 DOM.win.setTimeout(function() { 19 tiny MCE.remove(ed);20 tinymce.remove(ed); 20 21 DOM.remove('wp_mce_fullscreen_parent'); 21 tiny MCE.settings = tinyMCE.oldSettings; // Restore old settings22 tinymce.settings = tinymce.oldSettings; // Restore old settings 22 23 }, 10); 23 24 } … … 25 26 26 27 ed.addCommand('wpFullScreenSave', function() { 27 var ed = tiny MCE.get('wp_mce_fullscreen'), edd;28 var ed = tinymce.get('wp_mce_fullscreen'), edd; 28 29 29 30 ed.focus(); 30 edd = tiny MCE.get( ed.getParam('wp_fullscreen_editor_id') );31 edd = tinymce.get( ed.getParam('wp_fullscreen_editor_id') ); 31 32 32 33 edd.setContent( ed.getContent({format : 'raw'}), {format : 'raw'} ); … … 36 37 var d, b, fsed; 37 38 38 ed = tiny MCE.activeEditor;39 ed = tinymce.activeEditor; 39 40 d = ed.getDoc(); 40 41 b = d.body; 41 42 42 tiny MCE.oldSettings = tinyMCE.settings; // Store old settings43 tinymce.oldSettings = tinymce.settings; // Store old settings 43 44 44 45 tinymce.each(ed.settings, function(v, n) { … … 68 69 69 70 setTimeout(function(){ // add last 70 edd.onNodeChange.add( function(ed, cm, e){71 edd.onNodeChange.add( function() { 71 72 tinymce.each(buttons, function(c) { 72 73 var btn, cls; … … 146 147 }, 40); 147 148 } 148 } ;149 } 149 150 150 151 // Add appropriate listeners for resizing content area 151 ed.onInit.add( function(ed, l) {152 ed.onInit.add( function( ed ) { 152 153 ed.onChange.add(resize); 153 154 ed.onSetContent.add(resize); … … 156 157 ed.onPostRender.add(resize); 157 158 158 ed.getBody().style.overflowY = "hidden";159 ed.getBody().style.overflowY = 'hidden'; 159 160 }); 160 161 161 162 if ( ed.getParam('autoresize_on_init', true) ) { 162 ed.onLoadContent.add( function(ed, l) {163 ed.onLoadContent.add( function() { 163 164 // Because the content area resizes when its content CSS loads, 164 165 // and we can't easily add a listener to its onload event, … … 170 171 } 171 172 172 // Register the command so that it can be invoked by using tiny MCE.activeEditor.execCommand('mceExample');173 // Register the command so that it can be invoked by using tinymce.activeEditor.execCommand('mceExample'); 173 174 ed.addCommand('wpAutoResize', resize); 174 175 }, -
trunk/src/wp-includes/js/tinymce/plugins/wpgallery/editor_plugin_src.js
r24215 r26214 1 1 /* global tinymce */ 2 2 (function() { 3 3 tinymce.create('tinymce.plugins.wpGallery', { … … 79 79 n = new RegExp(n + '=\"([^\"]+)\"', 'g').exec(s); 80 80 return n ? tinymce.DOM.decode(n[1]) : ''; 81 } ;81 } 82 82 83 83 return co.replace(/(?:<p[^>]*>)*(<img[^>]+>)(?:<\/p>)*/g, function(a,im) { … … 113 113 }); 114 114 115 tinymce.dom.Event.add( editButton, 'mousedown', function(e) {115 tinymce.dom.Event.add( editButton, 'mousedown', function() { 116 116 var ed = tinymce.activeEditor; 117 117 ed.wpGalleryBookmark = ed.selection.getBookmark('simple'); 118 ed.execCommand( "WP_Gallery");118 ed.execCommand('WP_Gallery'); 119 119 ed.plugins.wordpress._hideButtons(); 120 120 }); … … 148 148 authorurl : 'http://wordpress.org', 149 149 infourl : '', 150 version : "1.0"150 version : '1.0' 151 151 }; 152 152 }
Note: See TracChangeset
for help on using the changeset viewer.