mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-03 20:24:26 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@27159 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -207,7 +207,7 @@ final class _WP_Editors {
|
||||
$ext_plugins = '';
|
||||
|
||||
if ( $set['teeny'] ) {
|
||||
self::$plugins = $plugins = apply_filters( 'teeny_mce_plugins', array( 'fullscreen', 'link', 'image', 'wordpress', 'wplink' ), $editor_id );
|
||||
self::$plugins = $plugins = apply_filters( 'teeny_mce_plugins', array( 'fullscreen', 'link', 'image', 'wordpress', 'wpeditimage', 'wplink' ), $editor_id );
|
||||
} else {
|
||||
/**
|
||||
* TinyMCE external plugins filter
|
||||
@@ -335,8 +335,12 @@ final class _WP_Editors {
|
||||
self::$first_init['external_plugins'] = json_encode( $mce_external_plugins );
|
||||
}
|
||||
|
||||
// WordPress default stylesheet
|
||||
$mce_css = array( self::$baseurl . '/skins/wordpress/wp-content.css' );
|
||||
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
||||
$version = 'ver=' . $GLOBALS['wp_version'];
|
||||
$dashicons = includes_url( "css/dashicons$suffix.css?$version" );
|
||||
|
||||
// WordPress default stylesheet and dashicons
|
||||
$mce_css = array( $dashicons, self::$baseurl . '/skins/wordpress/wp-content.css' );
|
||||
|
||||
// load editor_style.css if the current theme supports it
|
||||
if ( ! empty( $GLOBALS['editor_styles'] ) && is_array( $GLOBALS['editor_styles'] ) ) {
|
||||
|
||||
Reference in New Issue
Block a user