I have html in that i have a variable and try to modify it and apply after but after i change it code doesn't change.
So basiclly i have a code with table and i what to remove attribute and wrap by div.
let paste = editor.node.innerHTML;
//console.log(paste);
console.log($(paste).filter("table"))
$(paste).filter("table").each(function(i, item){
console.log($(this).attr('width'))
$(this).removeAttr('width');
console.log(item)
})
editor.node.innerHTML = paste
console.log(paste)
});
I successfully get that width but after loop i made log and it the same as it was before loop and attribute is still there
Give me an advice please