Ticket #29923: 29923.2.patch
File 29923.2.patch, 1.6 KB (added by , 9 years ago) |
---|
-
src/wp-includes/js/tinymce/plugins/wordpress/plugin.js
844 844 } 845 845 } ); 846 846 847 // Temporary iOS hack. 848 editor.on( 'selectionchange', function() { 849 editor.nodeChanged( { selectionChange: true } ); 850 } ); 851 847 852 editor.on( 'focus', function() { 848 853 if ( activeToolbar ) { 849 854 activeToolbar.show(); … … 882 887 editor.wp._createToolbar = create; 883 888 }, true ); 884 889 890 var toolbar; 891 892 editor.on( 'preinit', function() { 893 toolbar = editor.wp._createToolbar( [ 894 'bold', 895 'italic', 896 'link', 897 'strikethrough' 898 ], true ); 899 } ); 900 901 editor.on( 'wptoolbar', function( event ) { 902 if ( ! event.collapsed && tinymce.trim( editor.selection.getContent().replace( /<[^>]+>/g ) ) ) { 903 event.selection = editor.selection.getRng(); 904 event.toolbar = toolbar; 905 } 906 } ); 907 885 908 function noop() {} 886 909 887 910 // Expose some functions (back-compat) -
src/wp-includes/js/tinymce/plugins/wplink/plugin.js
113 113 $anchor = editor.$( anchor ); 114 114 href = $anchor.attr( 'href' ); 115 115 116 if ( href && ! $anchor.find( 'img' ).length ) {116 if ( event.collapsed && href && ! $anchor.find( 'img' ).length ) { 117 117 self.setURL( href ); 118 118 event.element = anchor; 119 119 event.toolbar = toolbar;