Disable sorting of element attributes

前端 未结 3 1472
春和景丽
春和景丽 2021-01-23 02:49

Is there a way to disable the sorting of element attributes so that checkDirty() will work correctly when allowedContent is set to true?

Example of the sorting of attrib

3条回答
  •  广开言路
    2021-01-23 03:18

    CKEDITOR.on( 'instanceReady', function( ev ) {
        ev.editor.dataProcessor.writer.sortAttributes = 0;
    });
    

    will disable attribute sorting for all editor instances on the page. This is not covered anywhere in CKEditor docs and was found by reviewing editor instance object.

提交回复
热议问题