[Bug]: Changing text color does not affect underline
Which packages did you experience the bug in?
react, extension-underline, extension-color
What Tiptap version are you using?
2.1.12
What’s the bug you are facing?
When underlining text that had it's color changed or when changing the color of underlined text the underline is always black. There should be an option to make it the same color as the text.
What browser are you using?
Chrome
Code example
No response
What did you expect to happen?
Expected the underline color to be the same as the text color
Anything to add? (optional)
No response
Did you update your dependencies?
- [X] Yes, I’ve updated my dependencies to use the latest version of all packages.
Are you sponsoring us?
- [ ] Yes, I’m a sponsor. 💖
I stumbled into the same issue today. To add on this - the problem is the order of the html tags:
The underline tag should be inside span tag not around it.
This affects me too. I also noticed it happens with strikethrough.
You can check this comment here
https://github.com/ueberdosis/tiptap/discussions/4689#discussioncomment-10131672
hm, maybe we could just change the priority of the extensions to have them apply in a different order? I forgot how the order is set
@nperez0111 Changing the order of extensions did the trick for me, thanks!
@nperez0111 Changing the order of extensions did the trick for me, thanks!
What order did you set so we can resolve this in future versions?
@nperez0111 maybe my config was bad to start with
before:
const extensions = [
StarterKit,
Underline,
TextStyle,
...
after:
const extensions = [
StarterKit,
TextStyle,
Underline,
...
@nperez0111 Just found out that strikethrough suffers with the same exact issue. Had to put TextStyle extension first.
This is now resolved in v2.6.0 (I gave text style a higher priority)