79817417

Date: 2025-11-12 06:51:39
Score: 2
Natty:
Report link

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);
  },
},
Reasons:
  • Blacklisted phrase (1): m facing the same problem
  • Whitelisted phrase (-2): solution:
  • Has code block (-0.5):
  • Me too answer (2.5): I'm facing the same problem
  • Low reputation (1):
Posted by: Артем