Skip to content
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

How to change text color? #819

Closed
jrcacd opened this issue May 16, 2019 · 10 comments
Closed

How to change text color? #819

jrcacd opened this issue May 16, 2019 · 10 comments

Comments

@jrcacd
Copy link

jrcacd commented May 16, 2019

No description provided.

@MrFuFuFu
Copy link

Any answer for that?

@hypest
Copy link
Contributor

hypest commented Dec 2, 2019

Aztec inherits from EditText and the setTextColor() method and friends are normally available to set the text color.

Will close this ticket now.

@hypest hypest closed this as completed Dec 2, 2019
@MrFuFuFu
Copy link

MrFuFuFu commented Dec 2, 2019

WechatIMG2

What I mean is like this. Well, I have already done this in my app and maybe can submit a PR later.

@hypest
Copy link
Contributor

hypest commented Dec 2, 2019

Oh, I see. The way Aztec supports rendering individual colored words/characters is via inline CSS in the HTML input. See these tests for examples: https://github.com/wordpress-mobile/AztecEditor-Android/blob/develop/aztec/src/test/kotlin/org/wordpress/aztec/HtmlAttributeStyleColorTest.kt#L35-L42.

@jrcacd
Copy link
Author

jrcacd commented Dec 2, 2019

Can Aztec have a button with a pallete for choosing the color?

@hypest
Copy link
Contributor

hypest commented Dec 2, 2019

Can Aztec have a button with a pallete for choosing the color?

From a design point of view, yes, I think it could. From the implementation side, I think it could take some effort for those who'll implemented it to hook up the relevant Span classes to support adding/setting/removing while in editing mode.

@jrcacd
Copy link
Author

jrcacd commented Dec 2, 2019

Can Aztec have a button with a pallete for choosing the color?

From a design point of view, yes, I think it could. From the implementation side, I think it could take some effort for those who'll implemented it to hook up the relevant Span classes to support adding/setting/removing while in editing mode.

That would be awesome.

@duyvt88
Copy link

duyvt88 commented May 30, 2020

@MrFuFuFu Could you please submit your code? I would like to have that capability. Or could you please give me a guide to do it?
Many Thanks,

@MrFuFuFu
Copy link

MrFuFuFu commented Jun 1, 2020

@duyvt88 thanks for asking. I did somehow managed to change the color, but somehow, it doesn't work as I expected. I'm now using https://github.com/wasabeef/richeditor-android it works great and easy to manage.

@duyvt88
Copy link

duyvt88 commented Jun 1, 2020

@duyvt88 thanks for asking. I did somehow managed to change the color, but somehow, it doesn't work as I expected. I'm now using https://github.com/wasabeef/richeditor-android it works great and easy to manage.
@MrFuFuFu Thanks for your reply. I will try it now.

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

No branches or pull requests

4 participants