Ticket #40690: 40690.patch
File 40690.patch, 2.1 KB (added by , 7 years ago) |
---|
-
src/wp-includes/js/tinymce/plugins/wordpress/plugin.js
682 682 mceIframe = document.getElementById( editor.id + '_ifr' ), 683 683 mceToolbar, 684 684 mceStatusbar, 685 namesAdded,686 685 wpStatusbar; 687 686 688 687 if ( container ) { … … 700 699 buttonGroup; 701 700 702 701 each( buttons, function( item ) { 703 var itemName , ui, name;702 var itemName; 704 703 705 704 function bindSelectorChanged() { 706 705 var selection = editor.selection; … … 768 767 769 768 buttonGroup = null; 770 769 } else { 771 // Add the new WP* types to the factory772 if ( ! namesAdded ) {773 ui = tinymce.ui;774 775 for ( name in ui ) {776 if ( name.toLowerCase().indexOf( 'wp' ) === 0 ) {777 Factory.add( name, ui[name] );778 }779 }780 781 namesAdded = true;782 }783 784 770 if ( ! buttonGroup ) { 785 771 buttonGroup = { 786 772 type: 'buttongroup', -
src/wp-includes/js/tinymce/plugins/wplink/plugin.js
1 1 ( function( tinymce ) { 2 tinymce.ui. WPLinkPreview =tinymce.ui.Control.extend( {2 tinymce.ui.Factory.add( 'WPLinkPreview', tinymce.ui.Control.extend( { 3 3 url: '#', 4 4 renderHtml: function() { 5 5 return ( … … 50 50 tinymce.$( this.getEl().firstChild ).attr( 'href', this.url ).text( url ); 51 51 } 52 52 } 53 } ) ;53 } ) ); 54 54 55 tinymce.ui. WPLinkInput =tinymce.ui.Control.extend( {55 tinymce.ui.Factory.add( 'WPLinkInput', tinymce.ui.Control.extend( { 56 56 renderHtml: function() { 57 57 return ( 58 58 '<div id="' + this._id + '" class="wp-link-input">' + … … 82 82 urlInput.value = ''; 83 83 urlInput.nextSibling.value = ''; 84 84 } 85 } ) ;85 } ) ); 86 86 87 87 tinymce.PluginManager.add( 'wplink', function( editor ) { 88 88 var toolbar;