WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/26/2012 02:12:54 PM (8 years ago)
Author:
koopersmith
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/media.php

    r21999 r22012  
    14151415        <a class="clear-selection" href="#"><?php _e('Clear selection'); ?></a>
    14161416    </script>
     1417
     1418    <script type="text/html" id="tmpl-editor-attachment">
     1419        <% if ( url ) { %>
     1420            <img src="<%- url %>" width="<%- width %>" height="<%- height %>" draggable="false" />
     1421        <% } %>
     1422
     1423        <% if ( uploading ) { %>
     1424            <div class="media-progress-bar"><div></div></div>
     1425        <% } %>
     1426        <div class="close">&times;</div>
     1427        <div class="describe"></div>
     1428    </script>
    14171429    <?php
    14181430}
Note: See TracChangeset for help on using the changeset viewer.