Changeset 6817 for CKEditor/trunk


Ignore:
Timestamp:
04/29/11 16:09:25 (3 years ago)
Author:
garry.yao
Message:

#7322: Font-family style normalization to have better compatibility.

Location:
CKEditor/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • CKEditor/trunk/CHANGES.html

    r6815 r6817  
    5454                <li><a href="http://dev.ckeditor.com/ticket/6109">#6109</a> : Paste and Paste as Plain Text dialog windows now use the standard <code><a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.html#commitContent">commitContent</a></code> and <code><a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.html#setupContent">setupContent</a></code> methods.</li> 
    5555                <li><a href="http://dev.ckeditor.com/ticket/7588">#7588</a> : The editor code now has a protection system to avoid issues when including ckeditor.js more than once in the page.</li> 
     56                <li><a href="http://dev.ckeditor.com/ticket/7322">#7322</a> : Text font plugin now recognizes font family names which contain quotations.</li> 
    5657        </ul> 
    5758        <h3> 
  • CKEditor/trunk/_source/plugins/styles/plugin.js

    r6637 r6817  
    14461446                else 
    14471447                        styleText = unparsedCssText; 
     1448 
     1449                // Normalize font-family property, ignore quotes and being case insensitive. (#7322) 
     1450                // http://www.w3.org/TR/css3-fonts/#font-family-the-font-family-property 
     1451                styleText = styleText.replace( /(font-family:)(.*?)(?=;|$)/, function ( match, prop, val ) 
     1452                { 
     1453                        var names = val.split( ',' ); 
     1454                        for ( var i = 0; i < names.length; i++ ) 
     1455                                names[ i ] = CKEDITOR.tools.trim( names[ i ].replace( /["']/g, '' ) ); 
     1456                        return prop + names.join( ',' ); 
     1457                }); 
    14481458 
    14491459                // Shrinking white-spaces around colon and semi-colon (#4147). 
Note: See TracChangeset for help on using the changeset viewer.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy