Make WordPress Core

Changeset 21961


Ignore:
Timestamp:
09/24/2012 12:13:18 AM (12 years ago)
Author:
koopersmith
Message:

Makes custom TinyMCE views easier to implement.

For details and examples, see the ticket.

props azaozz, fixes #21812.

Location:
trunk
Files:
5 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-form-advanced.php

    r21948 r21961  
    2323    wp_plupload_default_settings();
    2424    add_action( 'admin_footer', 'wp_print_media_templates' );
     25
     26    wp_enqueue_script( 'mce-view' );
    2527}
    2628
  • trunk/wp-includes/class-wp-editor.php

    r21875 r21961  
    168168                self::$mce_locale = $mce_locale = ( '' == get_locale() ) ? 'en' : strtolower( substr(get_locale(), 0, 2) ); // only ISO 639-1
    169169                $no_captions = (bool) apply_filters( 'disable_captions', '' );
    170                 $plugins = array( 'inlinepopups', 'spellchecker', 'tabfocus', 'paste', 'media', 'fullscreen', 'wordpress', 'wpeditimage', 'wpgallery', 'wplink', 'wpdialogs' );
     170                $plugins = array( 'inlinepopups', 'spellchecker', 'tabfocus', 'paste', 'media', 'fullscreen', 'wordpress', 'wpeditimage', 'wpgallery', 'wplink', 'wpdialogs', 'wpview' );
    171171                $first_run = true;
    172172                $ext_plugins = '';
    173173
    174174                if ( $set['teeny'] ) {
    175                     self::$plugins = $plugins = apply_filters( 'teeny_mce_plugins', array('inlinepopups', 'fullscreen', 'wordpress', 'wplink', 'wpdialogs'), $editor_id );
     175                    self::$plugins = $plugins = apply_filters( 'teeny_mce_plugins', array('inlinepopups', 'fullscreen', 'wordpress', 'wplink', 'wpdialogs', 'wpview'), $editor_id );
    176176                } else {
    177177                    /*
  • trunk/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/content.css

    r21532 r21961  
    142142}
    143143
     144/* WordPress TinyMCE Previews */
     145div.wp-preview-wrap {
     146    display: inline;
     147}
  • trunk/wp-includes/script-loader.php

    r21814 r21961  
    323323    ) );
    324324
     325    $scripts->add( 'mce-view', "/wp-includes/js/mce-view$suffix.js", array( 'backbone', 'jquery' ), false, 1 );
     326
    325327    if ( is_admin() ) {
    326328        $scripts->add( 'ajaxcat', "/wp-admin/js/cat$suffix.js", array( 'wp-lists' ) );
Note: See TracChangeset for help on using the changeset viewer.