Disable sorting of element attributes

前端 未结 3 1544
春和景丽
春和景丽 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:33

    This is what I ended up using based on Reinmar's suggestions.

    jsfiddle

    var isdirty = function(ckeditor) {
            return ckeditor.initialdata !== ckeditor.getData();
    
        };
    CKEDITOR.on('instanceReady', function (event) {
            event.editor.initialdata = event.editor.getData();
        });
    

提交回复
热议问题