Skip to content

fix: fixed link color bug#457

Merged
m-Ryan merged 1 commit intozalify:masterfrom
isxiaoxin:Fix-link-color-bug
Jul 10, 2025
Merged

fix: fixed link color bug#457
m-Ryan merged 1 commit intozalify:masterfrom
isxiaoxin:Fix-link-color-bug

Conversation

@isxiaoxin
Copy link
Copy Markdown
Contributor

The cause of the incident was that when I was using it, I found that if I first set a font size for the text, wrap the line at will in the middle of the text, then insert a link, and then modify the color of the link, it would not work.
image
After checking the source code, I can see that the font tag has the color attribute, but the a tag applies the browser's default color, but I remember that the color: inherit attribute would be set to the a tag when creating the tag. I guess that when executing document.execCommand ('foreColor', false, val), thecolorof the child element would be removed, causing this problem
image
So my modification idea is to create the link, get the selected a tag, and then add color: inherit to its style. After testing, this problem can be solved, and the output results are also very good.

@m-Ryan m-Ryan merged commit c69c2ce into zalify:master Jul 10, 2025
1 check passed
@m-Ryan
Copy link
Copy Markdown
Collaborator

m-Ryan commented Jul 10, 2025

Released in the latest version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants