Opened 13 years ago

Closed 13 years ago

#7287 closed Bug (invalid)

change href in a tag with htmlFilter doenst work

Reported by: Eric Brüggemann Owned by:
Priority: Normal Milestone:
Component: Core : Output Data Version: 3.5
Keywords: htmlFilter Cc:


If you try to apply a filter for the href attribute auf a tags the new value is not written back to the html so.

CKEDITOR.on( 'instanceReady', function( ev )
    var editor = ev.editor,
    dataProcessor = editor.dataProcessor,
    htmlFilter = dataProcessor &&    dataProcessor.htmlFilter;
        elements :{
            a : function ( element ){
                element.attributes['href'] = "";

this will first alert the old href than the changed href but the href attribute itself wont change

Change History (1)

comment:1 Changed 13 years ago by Garry Yao

Resolution: invalid
Status: newclosed

Editor protects certain attributes to avoid browser touching them, so when in html filter, please manipulate "data-cke-saved-href" instead of "href".

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy