Ticket #3560: 3560_2.patch

File 3560_2.patch, 1.6 KB (added by Artur Formella, 15 years ago)
  • _source/core/htmlparser/element.js

     
    128128                                                break;
    129129
    130130                                        writeName = element.name;
     131                                        if ( !writeName )       // Send children.
     132                                        {
     133                                                CKEDITOR.htmlParser.fragment.prototype.writeHtml.apply( element, arguments );
     134                                                return;
     135                                        }
    131136                                }
    132137
    133138                                // The element may have been changed, so update the local
  • _source/plugins/scayt/plugin.js

     
    7777                        });
    7878
    7979                // Listen to data manipulation to reflect scayt markup.
    80                 editor.on( 'beforeGetData', function()
    81                         {
    82                                 if ( plugin.isScaytEnabled( editor ) )
    83                                         plugin.getScayt( editor ).refresh();
    84                         });
    85 
    8680                editor.on( 'afterSetData', function()
    8781                        {
    8882                                if ( plugin.isScaytEnabled( editor ) )
     
    9791                                ev.data.scayt = scayt;
    9892                        });
    9993
     94                var dataProcessor = editor.dataProcessor,
     95                        htmlFilter = dataProcessor && dataProcessor.htmlFilter;
     96                if ( htmlFilter )
     97                {
     98                        htmlFilter.addRules(
     99                                {
     100                                        elements :
     101                                        {
     102                                                span : function( element )
     103                                                {
     104                                                        if ( element.attributes.scayt_word && element.attributes.scaytid )
     105                                                        {
     106                                                                delete element.name;    // Write children, but don't write this node.
     107                                                                return element;
     108                                                        }
     109                                                }
     110                                        }
     111                                }
     112                        );
     113                }
     114
    100115                if ( editor.document )
    101116                {
    102117                        createInstnce();
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy