Ticket #2837: 2837.patch

File 2837.patch, 1.2 KB (added by Garry Yao, 15 years ago)
  • _source/plugins/styles/plugin.js

     
    529529
    530530        var getElement = function( style, targetDocument )
    531531        {
    532                 var el = style._.element;
    533 
    534                 if ( el )
    535                         return el.clone();
    536532
    537533                var def = style._.definition;
    538534                var variables = style._.variables;
     
    540536                var elementName = style.element;
    541537                var attributes = def.attributes;
    542538                var styles = def.styles;
     539               
     540                // Create the element.
     541                var el = ( style._.element = new CKEDITOR.dom.element( elementName, targetDocument ) );
    543542
    544543                // The "*" element name will always be a span for this function.
    545544                if ( elementName == '*' )
     
    545544                if ( elementName == '*' )
    546545                        elementName = 'span';
    547546
    548                 // Create the element.
    549                 el = new CKEDITOR.dom.element( elementName, targetDocument );
    550 
    551547                // Assign all defined attributes.
    552548                if ( attributes )
    553549                {
     
    583579                        }
    584580                }
    585581
    586                 // Save the created element. It will be reused on future calls.
    587                 return ( style._.element = el );
     582                return style._.element;
    588583        };
    589584})();
    590585
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy