-
-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Desktop: Resolves #9468: Add support for changing text colors in rich text editor #9578
Desktop: Resolves #9468: Add support for changing text colors in rich text editor #9578
Conversation
…s in rich text editor
const hexColorRegex = /^\#[a-zA-Z0-9]+$/; | ||
return node.nodeName === 'SPAN' && node.getAttribute('joplin-color')?.match(hexColorRegex); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps a better option here would be to use a turndown option perserveTextColors
(similar to what we do with nested tables).
It may also make sense to put rules.foregroundColor
somewhere else (turndown-plugin-gfm
?).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I wonder about this too. We can't have it enabled by default as it would apply to email-to-note or clipped web pages, but when switching between the rich text and Markdown I think that would make sense.
And it means we have a more generic solution without needing an extra "joplin-color" attribute
Looks good, thanks Henry! |
Hi, I just installed Joplin and I am looking to use this new feature but can't find any trace of it in the current version. Is this scheduled for the next version or is there a particular way to enable it. I just started migrating from Evernote and text colors is the one feature that Joplin is missing for me to use it. I am using the Windows version. |
This feature should be in Joplin ≥ 2.14.6, which is currently in pre-release. |
Summary
Adds support for changing text colors in TinyMCE.
Resolves #9468.
Notes & known issues
inline code
is not supported currently. At present, it works within the editor, but Turndown discards the formatting.<span style="color: #2DC26B;">This</span> is a <span style="color: #e67e23;">tes
Screenshots
Testing
This is a test.
test
and change its color to orange.This
and change its color to green.This has been successfully tested on Ubuntu 23.10.