Ticket #1502: 1502.patch

File 1502.patch, 1.8 KB (added by Alfonso Martínez de Lizarrondo, 16 years ago)

Proposed SVN patch

  • editor/_source/internals/fckdomtools.js

     
    517517                return element.removeAttribute( attributeName, 0 ) ;
    518518        },
    519519
     520        /**
     521         * Removes a comma separated list of attributes from an element
     522         */
     523        RemoveAttributes : function (element, attributesList )
     524        {
     525                var aAttributes = attributesList.split(',');
     526                for ( var i = 0 ; i < aAttributes.length ; i++ )
     527                        this.RemoveAttribute( element, aAttributes[i] );
     528        },
     529
    520530        GetAttributeValue : function( element, att )
    521531        {
    522532                var attName = att ;
  • editor/_source/internals/fckstyles.js

     
    210210                        // Remove elements nodes that match with this style rules.
    211211                        if ( tagsRegex.test( currentNode.nodeName ) )
    212212                                FCKDomTools.RemoveNode( currentNode, true ) ;
     213                        else
     214                                FCKDomTools.RemoveAttributes( currentNode, FCKConfig.RemoveAttributes );
    213215
    214216                        currentNode = nextNode ;
    215217                }
  • fckconfig.js

     
    189189// Only inline elements are valid.
    190190FCKConfig.RemoveFormatTags = 'b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var' ;
    191191
     192FCKConfig.RemoveAttributes = 'class,style,lang,width,height,align,v:shapes,x:str,x:num,hspace,valign' ;
     193
    192194FCKConfig.CustomStyles =
    193195{
    194196        'Red Title'     : { Element : 'h3', Styles : { 'color' : 'Red' } }
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy