Ticket #28173: 28173.patch
File 28173.patch, 1.3 KB (added by , 10 years ago) |
---|
-
src/wp-includes/js/media-editor.js
757 757 * @param {string} html Content to send to the editor 758 758 */ 759 759 insert: function( html ) { 760 var editor, 760 var editor, wpActiveEditor, 761 761 hasTinymce = ! _.isUndefined( window.tinymce ), 762 hasQuicktags = ! _.isUndefined( window.QTags ), 762 hasQuicktags = ! _.isUndefined( window.QTags ); 763 764 if ( this.activeEditor ) { 765 wpActiveEditor = window.wpActiveEditor = this.activeEditor; 766 } else { 763 767 wpActiveEditor = window.wpActiveEditor; 768 } 764 769 765 770 // Delegate to the global `send_to_editor` if it exists. 766 771 // This attempts to play nice with any themes/plugins that have … … 921 926 } 922 927 923 928 // If an empty `id` is provided, default to `wpActiveEditor`. 924 id = w pActiveEditor;929 id = window.wpActiveEditor; 925 930 926 931 // If that doesn't work, fall back to `tinymce.activeEditor.id`. 927 932 if ( ! id && ! _.isUndefined( window.tinymce ) && tinymce.activeEditor ) { … … 1053 1058 options = options || {}; 1054 1059 1055 1060 id = this.id( id ); 1061 this.activeEditor = id; 1056 1062 1057 1063 workflow = this.get( id ); 1058 1064