Ticket #27941: 27941.4.patch
File 27941.4.patch, 2.2 KB (added by , 11 years ago) |
---|
-
src/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js
1 1 /* global tinymce */ 2 2 tinymce.PluginManager.add( 'wpeditimage', function( editor ) { 3 var toolbarActive = false; 3 var ghostObject, resizeHelper, 4 toolbarActive = false; 4 5 5 6 function parseShortcode( content ) { 6 7 return content.replace( /(?:<p>)?\[(?:wp_)?caption([^\]]+)\]([\s\S]+?)\[\/(?:wp_)?caption\](?:<\/p>)?/g, function( a, b, c ) { … … 963 964 } 964 965 }); 965 966 967 // Resize helper. Note: not used in IE < 11 968 function resizing( event ) { 969 editor.dom.setStyles( resizeHelper, { top: event.pageY, left: event.pageX, display: 'block' } ); 970 editor.dom.setHTML( resizeHelper, ghostObject.clientWidth + ' × ' + ghostObject.clientHeight ); 971 } 972 973 editor.on( 'ObjectResizeStart', function( event ) { 974 resizeHelper = editor.dom.create( 'DIV', { 'class': 'mce-resize-helper', 'data-mce-bogus': 1 }, event.width + ' × ' + event.height ); 975 ghostObject = editor.dom.select( '.mce-clonedresizable' )[0]; 976 editor.getBody().appendChild( resizeHelper ); 977 editor.on( 'mousemove', resizing ); 978 }); 979 980 editor.on( 'ObjectResized', function( event ) { 981 editor.off( 'mousemove', resizing ); 982 editor.dom.remove( resizeHelper ); 983 resizeHelper = null; 984 }); 985 966 986 return { 967 987 _do_shcode: parseShortcode, 968 988 _get_shcode: getShortcode -
src/wp-includes/js/tinymce/skins/wordpress/wp-content.css
476 476 margin-right: 7px; 477 477 } 478 478 479 /* Resize helper. */ 480 .mce-resize-helper { 481 background-color: #555; 482 background-color: rgba( 0, 0, 0, 0.75 ); 483 border-radius: 3px; 484 color: white; 485 display: none; 486 font-family: sans-serif; 487 font-size: 14px; 488 line-height: 14px; 489 margin: 5px 10px; 490 padding: 5px; 491 position: absolute; 492 } 493 479 494 @media print, 480 495 (-o-min-device-pixel-ratio: 5/4), 481 496 (-webkit-min-device-pixel-ratio: 1.25),