1 year ago
#263098
Titus Popovici
Remove text color and background color in Tiptap/Prosemirror on paste
How can I remove the color and background color from pasted text in tiptap/prosemirror, in a clean way? I have a specific palette of colors that are allowed for the text in the editor, and I don't want people pasting from other places to be able to overwrite that.
I could intercept the paste, parse the string and remove style attributes but I'm thinking there must be a cleaner way to do this.
javascript
tiptap
prose-mirror
0 Answers
Your Answer