-
Notifications
You must be signed in to change notification settings - Fork 236
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
Support background color for a range of text #22
Comments
Hi Maher, this is currently not supported. Whatever style you assign to a range ends up being applied to a Text node. Text node itself does not support background color. I suppose it would be possible to extend Text to support this, but I would have to research it more thoroughly. |
Hi Tomas, As an alternative, I will use the "-fx-strikethrough: true" "-fx-strikethroug: false" to highlight ranges in a way that does change their appearance much. I am trying to avoid changing other parameters. |
Hi Maher, maybe you will prefer the dropshadow effect: -fx-effect: dropshadow(gaussian, yellow, 3, 1, 0, 0); |
Hi Tomas,
I am in the process of implementing a highlighting method.
I am doing this simple code. I verified all values, they are all fine.
tempStype = "-fx-background-color: yellow;" ;
indexRange =richText.getSelection();
richText.setStyle(indexRange.getStart(), indexRange.getEnd(), tempStyle);
I notice a change in the range style, but the background is not affected. Is it broken? Can you verify?
The text was updated successfully, but these errors were encountered: