Ticket #5399: 5399.patch

File 5399.patch, 1.1 KB (added by Garry Yao, 14 years ago)
  • _source/plugins/pastefromword/filter/default.js

     
    118118                return result;
    119119        };
    120120
    121         var cssLengthRelativeUnit = /^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz){1}?/i;
     121        var cssLengthRelativeUnit = /^([.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz){1}?/i;
    122122        var emptyMarginRegex = /^(?:\b0[^\s]*\s*){1,4}$/;               // e.g. 0px 0pt 0px
    123123
    124124        var listBaseIndent = 0,
     
    219219                                                                        {
    220220                                                                                // Be able to deal with component/short-hand form style.
    221221                                                                                var values = margin.split( ' ' );
    222                                                                                 margin = values[ 3 ] || values[ 1 ] || values [ 0 ];
     222                                                                                margin = CKEDITOR.plugins.pastefromword.utils.convertToPx( values[ 3 ] || values[ 1 ] || values [ 0 ] );
    223223                                                                                margin = parseInt( margin, 10 );
    224224
    225225                                                                                // Figure out the indent unit by looking at the first increament.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy