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

Set text size and color not work #55

Open
yunting0728 opened this issue Jul 30, 2020 · 0 comments
Open

Set text size and color not work #55

yunting0728 opened this issue Jul 30, 2020 · 0 comments

Comments

@yunting0728
Copy link

I want to create text editor.

When user click button to change text size or color, I will detect keyboard is showing or not, if keyboard is showing, I will close keyboard and show the size or color choose layout.

If user select words that they want to change the style, then click button to choose new size or color, it works well. It will change the style to only select words, the words before select words will not be
affected, the words after select words will keep select size or color style.

But if user didn't select any words just click button then choose size or color, they need to click EditText (net.dankito.richtexteditor.android.RichTextEditor) to type word again. In this moment, because they didn't select any words so the size and color style will not change success, then they click EditText (net.dankito.richtexteditor.android.RichTextEditor) again will make size or color style be restored.

I use setFontSize/setTextColor to change text size or color when user click button and choose. I try to use setEditorFontSize/ setEditorFontColor to change, but it will make all words that in EditText (net.dankito.richtexteditor.android.RichTextEditor) be changed.

I want that when user didn't select any words just choose size or color, the EditText (net.dankito.richtexteditor.android.RichTextEditor) will remember user choose size or color style, and when user click EditText (net.dankito.richtexteditor.android.RichTextEditor) to type word again will set remember style to EditText (net.dankito.richtexteditor.android.RichTextEditor), and the words before user choose size or color will not be affected.

How can I fix it, thank you

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

1 participant