mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
First pass on TinyMCE attachment in-editor UI.
* Adds in-editor UI for image attachments. Most of this UI should be able to migrate to all images in a future commit. * Removes the wpeditimage TinyMCE plugin from the default plugins array. * Add `wp.media.fit`, a helper method to constrain dimensions based upon a maximum width and/or height. * Add html attribute parsing and string generation utilities (currently stored in mce-views). * Calling `remove` on a TinyMCE views now ensures that the the parent and references are removed as well. * Fixes a bug where we weren't sending the full array of results to matches in wp.mce.view. see #21390, #21812, #21813. git-svn-id: https://develop.svn.wordpress.org/trunk@22012 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -323,7 +323,10 @@ function wp_default_scripts( &$scripts ) {
|
||||
) );
|
||||
|
||||
$scripts->add( 'shortcode', "/wp-includes/js/shortcode$suffix.js", array( 'underscore' ), false, 1 );
|
||||
$scripts->add( 'mce-view', "/wp-includes/js/mce-view$suffix.js", array( 'shortcode', 'backbone', 'jquery' ), false, 1 );
|
||||
$scripts->add( 'mce-view', "/wp-includes/js/mce-view$suffix.js", array( 'shortcode', 'media-models' ), false, 1 );
|
||||
did_action( 'init' ) && $scripts->localize( 'mce-view', '_wpMceViewL10n', array(
|
||||
'contentWidth' => isset( $GLOBALS['content_width'] ) ? $GLOBALS['content_width'] : 800,
|
||||
) );
|
||||
|
||||
if ( is_admin() ) {
|
||||
$scripts->add( 'ajaxcat', "/wp-admin/js/cat$suffix.js", array( 'wp-lists' ) );
|
||||
|
||||
Reference in New Issue
Block a user