I'm facing the same problem and this could be a solution:
editorProps: {
transformPastedHTML(html) {
function removeInlineStyles(html) {
const div = document.createElement('div');
div.innerHTML = html;
// remove style property from each element (or of any kind you need)
div.querySelectorAll('[style]').forEach((el) => el.removeAttribute('style'));
return div.innerHTML;
}
return removeInlineStyles(html);
},
},