Make WordPress Core

Changeset 24211


Ignore:
Timestamp:
05/08/2013 11:03:44 PM (13 years ago)
Author:
azaozz
Message:

TinyMCE: attempt a workaround for WebKit bug inserting spans with font styles when creating UL or OL. See #17154

Location:
trunk/wp-includes/js/tinymce
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js

    r23745 r24211  
    88        tinymce.create('tinymce.plugins.WordPress', {
    99                init : function(ed, url) {
    10                         var t = this, tbId = ed.getParam('wordpress_adv_toolbar', 'toolbar2'), last = 0, moreHTML, nextpageHTML, closeOnClick, mod_key;
     10                        var t = this, tbId = ed.getParam('wordpress_adv_toolbar', 'toolbar2'), last = 0, moreHTML, nextpageHTML, closeOnClick, mod_key, style;
    1111                        moreHTML = '<img src="' + url + '/img/trans.gif" class="mceWPmore mceItemNoResize" title="'+ed.getLang('wordpress.wp_more_alt')+'" />';
    1212                        nextpageHTML = '<img src="' + url + '/img/trans.gif" class="mceWPnextpage mceItemNoResize" title="'+ed.getLang('wordpress.wp_page_alt')+'" />';
     
    134134                                        }
    135135                                }
     136
     137                                if ( tinymce.isWebKit && ( 'InsertUnorderedList' == cmd || 'InsertOrderedList' == cmd ) ) {
     138                                        if ( !style )
     139                                                style = ed.dom.create('style', {'type': 'text/css'}, '#tinymce,#tinymce span,#tinymce li,#tinymce li>span,#tinymce p,#tinymce p>span{font:medium sans-serif;color:#000;line-height:normal;}');
     140
     141                                        ed.getDoc().head.appendChild( style );
     142                                }
     143                        });
     144
     145                        ed.onExecCommand.add( function( ed, cmd, ui, val ) {
     146                                if ( tinymce.isWebKit && style && ( 'InsertUnorderedList' == cmd || 'InsertOrderedList' == cmd ) )
     147                                        ed.dom.remove( style );
    136148                        });
    137149
  • trunk/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/content.css

    r22586 r24211  
    4444        color: #333;
    4545        margin: 10px;
    46 }
    47 
    48 br[data-mce-bogus] {
    49         line-height: 1em;
    50         margin-top: -1em;
    51 }
    52 
    53 br[data-mce-bogus]:only-child {
    54         line-height: inherit;
    55         margin-top: inherit;
    5646}
    5747
Note: See TracChangeset for help on using the changeset viewer.