Getting highlight color under curser or selection #5495
-
I'm using the highlight plugin and trying to figure out how do I get the color of the highlighted text. Let's say I used the following code to set the color:
Later, the user highlights or clicks on the portion of the text that was highlighted. How do read the highlight color in this instance? Looking at the docs or source for that extension (https://tiptap.dev/docs/editor/extensions/marks/highlight) I'm not seeing how to read it back. I tried to reverse-engineer how |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
In case someone else lands on this, need to set |
Beta Was this translation helpful? Give feedback.
In case someone else lands on this, need to set
multicolor: true
, otherwise the attributes are not returned. Yes, this enables multicolor highlight support 🤷