Ticket #6506: 6506.patch

File 6506.patch, 2.2 KB (added by Sa'ar Zac Elias, 13 years ago)
  • _source/plugins/htmldataprocessor/plugin.js

     
    9898        for ( i in blockLikeTags )
    9999                defaultDataBlockFilterRules.elements[ i ] = extendBlockForDisplay;
    100100
     101        var htmlHeightRegex = /((^|;)\s*height\s*\:\s*)[^\;]*(;|$)/i;
     102
    101103        var defaultHtmlFilterRules =
    102104                {
    103105                        elementNames :
     
    182184                                {
    183185                                        delete element.attributes.contenteditable;
    184186                                        delete element.attributes[ 'class' ];
     187                                       
     188                                        if ( element.attributes.style )
     189                                        {
     190                                                element.attributes.style = element.attributes.style.replace( htmlHeightRegex, function( m, dec, sep, ending )
     191                                                        {
     192                                                                var realHeight = element.attributes[ '_cke_height' ];
     193                                                                if ( !realHeight )
     194                                                                        return '';
     195                                                                return dec + realHeight + ending;
     196                                                        });
     197
     198                                                if ( element.attributes.style == '' )
     199                                                        delete element.attributes.style;
     200                                        }
    185201                                },
    186202
    187203                                body : function( element )
     
    193209                                style : function( element )
    194210                                {
    195211                                        var child = element.children[ 0 ];
    196                                         child && child.value && ( child.value = CKEDITOR.tools.trim( child.value ));
     212                                        child && child.value && ( child.value = CKEDITOR.tools.trim( child.value ) );
    197213
    198214                                        if ( !element.attributes.type )
    199215                                                element.attributes.type = 'text/css';
  • _source/plugins/wysiwygarea/plugin.js

     
    556556                                                if ( CKEDITOR.env.gecko )
    557557                                                {
    558558                                                        // Set the HTML style to 100% to have the text cursor in affect (#6341)
    559                                                         domDocument.getDocumentElement().setStyle( 'height', '100%' );
     559                                                        var docElement = domDocument.getDocumentElement(), height;
     560                                                        if ( ( height = docElement.getStyle( 'height' ) ) )
     561                                                                docElement.setAttribute( '_cke_height', height )
     562                                                        docElement.setStyle( 'height', '100%' );
     563
    560564                                                        domDocument.on( 'mouseup', function( ev )
    561565                                                        {
    562566                                                                if ( ev.data.$.button == 2 )
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy