mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
TinyMCE: re-enable soft resizing of images inside the editor. See #24067.
Built from https://develop.svn.wordpress.org/trunk@26934 git-svn-id: http://core.svn.wordpress.org/trunk@26815 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
90403aed4b
commit
6c0fe71d05
@ -312,7 +312,6 @@ final class _WP_Editors {
|
||||
'entities' => '38,amp,60,lt,62,gt',
|
||||
'entity_encoding' => 'raw',
|
||||
'menubar' => false,
|
||||
'object_resizing' => false,
|
||||
'keep_styles' => false,
|
||||
'paste_remove_styles' => true,
|
||||
|
||||
|
@ -331,6 +331,15 @@ tinymce.PluginManager.add( 'wpeditimage', function( editor ) {
|
||||
});
|
||||
});
|
||||
|
||||
editor.on( 'ObjectResized', function( event ) {
|
||||
var parent,
|
||||
node = event.target;
|
||||
|
||||
if ( node.nodeName === 'IMG' && ( parent = editor.dom.getParent( node, '.wp-caption' ) ) ) {
|
||||
editor.dom.setStyle( parent, 'width', 10 + event.width + 'px' );
|
||||
}
|
||||
});
|
||||
|
||||
editor.on( 'BeforeExecCommand', function( e ) {
|
||||
var node, p, DL, align,
|
||||
cmd = e.command,
|
||||
|
File diff suppressed because one or more lines are too long
Binary file not shown.
Loading…
Reference in New Issue
Block a user