Make WordPress Core


Ignore:
Timestamp:
02/10/2014 11:47:34 PM (10 years ago)
Author:
azaozz
Message:

Edit image in TinyMCE:

  • Add a "toolbar" at the top of the image with two buttons: Edit and Delete.
  • Don't open the edit modal on second click on the image. Makes the "edit" button somewhat pointless and can sometimes trigger after resizing the image.
  • When the image has caption: attempt to prevent IE11 from making the caption element resizable and wrapping it in thick border.
  • When the caret is inside a caption next to the image, pressing Enter will create a new <p> tag above the caption.
  • Hide the image toolbar on drag, cut, align.

Props gcorne, see #24409.

File:
1 edited

Legend:

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

    r27093 r27159  
    208208
    209209                if ( $set['teeny'] ) {
    210                     self::$plugins = $plugins = apply_filters( 'teeny_mce_plugins', array( 'fullscreen', 'link', 'image', 'wordpress', 'wplink' ), $editor_id );
     210                    self::$plugins = $plugins = apply_filters( 'teeny_mce_plugins', array( 'fullscreen', 'link', 'image', 'wordpress', 'wpeditimage', 'wplink' ), $editor_id );
    211211                } else {
    212212                    /**
     
    336336                }
    337337
    338                 // WordPress default stylesheet
    339                 $mce_css = array( self::$baseurl . '/skins/wordpress/wp-content.css' );
     338                $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
     339                $version = 'ver=' . $GLOBALS['wp_version'];
     340                $dashicons = includes_url( "css/dashicons$suffix.css?$version" );
     341
     342                // WordPress default stylesheet and dashicons
     343                $mce_css = array( $dashicons, self::$baseurl . '/skins/wordpress/wp-content.css' );
    340344
    341345                // load editor_style.css if the current theme supports it
Note: See TracChangeset for help on using the changeset viewer.