WordPress.org

Make WordPress Core

Changeset 26934 for trunk


Ignore:
Timestamp:
01/13/2014 01:12:20 AM (7 years ago)
Author:
azaozz
Message:

TinyMCE: re-enable soft resizing of images inside the editor. See #24067.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-editor.php

    r26899 r26934  
    313313                    'entity_encoding' => 'raw',
    314314                    'menubar' => false,
    315                     'object_resizing' => false,
    316315                    'keep_styles' => false,
    317316                    'paste_remove_styles' => true,
  • trunk/src/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js

    r26900 r26934  
    332332    });
    333333
     334    editor.on( 'ObjectResized', function( event ) {
     335        var parent,
     336            node = event.target;
     337
     338        if ( node.nodeName === 'IMG' && ( parent = editor.dom.getParent( node, '.wp-caption' ) ) ) {
     339            editor.dom.setStyle( parent, 'width', 10 + event.width + 'px' );
     340        }
     341    });
     342
    334343    editor.on( 'BeforeExecCommand', function( e ) {
    335344        var node, p, DL, align,
Note: See TracChangeset for help on using the changeset viewer.