Skip to content

<font color> #277

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

Closed
klaszlo8207 opened this issue May 4, 2020 · 9 comments · Fixed by #694
Closed

<font color> #277

klaszlo8207 opened this issue May 4, 2020 · 9 comments · Fixed by #694

Comments

@klaszlo8207
Copy link

klaszlo8207 commented May 4, 2020

font color='#ffdedede' not working

how to colorize a text?

@ryan-berger
Copy link
Contributor

@klaszlo8207 The attribute of "font color" does not exist in CSS, rather, you should use the color property to get the desired font color.

If you have an example of the library working incorrectly with the font color set correctly, please reply with a code example so that I can reproduce the issue.

@derChris77
Copy link

In the following example

This is a Test! This is a red Test more words!

The last "Test" (which should be displayed in red) is cut off. Replacing "font" with "span" would display the text but in black.... Are there plans to support colors in text?

@mitesh77
Copy link

mitesh77 commented Sep 1, 2020

"font color" this feature is available?
any have a solution ? I need it as soon as.

@erickok erickok changed the title font color <font color> Feb 8, 2021
@erickok
Copy link
Contributor

erickok commented Feb 8, 2021

I think you are referring to the <font> tag which doesn't exist in html 5. Should we support this?

@tneotia
Copy link
Contributor

tneotia commented Feb 10, 2021

I feel that we should adhere to current HTML spec with the plugin. It wouldn't be hard to support this tag, but we already have the ability to set font color via CSS inline styles, which is the recommended way to do it (e.g. <p style="color: #FFFFFF;">White text</p>). Let us know if you disagree.

@tneotia
Copy link
Contributor

tneotia commented May 19, 2021

@erickok any decision on this?

@erickok
Copy link
Contributor

erickok commented May 19, 2021

I'm on the fence about it. I tend to just leave this issue open to allow interested parties to find and comment here. But not support the font tag yet until we feel this is an often desired feature.

@tneotia
Copy link
Contributor

tneotia commented May 22, 2021

Actually, just a few days later, I have a need for this feature as well 😅...

My use case is as follows:

I have an html rich text editor package that uses Flutter widgets for the controls and a webview with a contenteditable for the editor area. To communicate between the two, I often use Javascript document.execCommand methods. These are technically deprecated but at the moment there is still no real replacement for these APIs, so most developers are still using them today since they work in modern browsers.

Because these APIs haven't been updated in a while, when changing the font size or font color via document.execCommand, it adds the <font> tag around the selected text. Thus, I had a user request to change this feature at tneotia/html-editor-enhanced#46, but I can't do anything about how the API works. I think that support for this tag will be helpful for anyone dealing with contenteditable document, whether it is HTML from Flutter packages like mine, or HTML that was created using a contenteditable elsewhere.

@erickok if this is enough to sway you I can probably make a quick PR, let me know your thoughts.

@erickok
Copy link
Contributor

erickok commented May 22, 2021

Sure let's do it.

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 a pull request may close this issue.

6 participants