Ticket #26027: 26027.patch
File 26027.patch, 1.7 KB (added by , 11 years ago) |
---|
-
src/wp-includes/js/tinymce/plugins/wpview/editor_plugin_src.js
2 2 * WordPress View plugin. 3 3 */ 4 4 5 /* global tinymce */ 6 5 7 (function() { 6 8 var VK = tinymce.VK, 7 9 TreeWalker = tinymce.dom.TreeWalker, … … 8 10 selected; 9 11 10 12 tinymce.create('tinymce.plugins.wpView', { 11 init : function( editor , url) {13 init : function( editor ) { 12 14 var wpView = this; 13 15 14 16 // Check if the `wp.mce` API exists. … … 33 35 34 36 // When the editor's content has been updated and the DOM has been 35 37 // processed, render the views in the document. 36 editor.onSetContent.add( function( editor , o) {38 editor.onSetContent.add( function( editor ) { 37 39 wp.mce.view.render( editor.getDoc() ); 38 40 }); 39 41 … … 41 43 42 44 // When a view is selected, ensure content that is being pasted 43 45 // or inserted is added to a text node (instead of the view). 44 editor.selection.onBeforeSetContent.add( function( selection , o) {46 editor.selection.onBeforeSetContent.add( function( selection ) { 45 47 var view = wpView.getParentView( selection.getNode() ), 46 48 walker, target; 47 49 … … 95 97 96 98 // Triggers when the selection is changed. 97 99 // Add the event handler to the top of the stack. 98 editor.onNodeChange.addToTop( function( editor, controlManager, node , collapsed, o) {100 editor.onNodeChange.addToTop( function( editor, controlManager, node ) { 99 101 var view = wpView.getParentView( node ); 100 102 101 103 // Update the selected view.