-
Notifications
You must be signed in to change notification settings - Fork 237
What is the proper way to lazily add styles to paragraphs in RichTextFX? #1273
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
Comments
For example in JavaFX CodeArea they use decorator:
|
Yes, have a look at JavaKeywordsDemo |
@Jugen Thank you very much for your help. Do I understand correctly - you are talking about this one:
|
Yes :-) |
@Jugen Thank you very much. This is what I was looking for. The only problem it doesn't work as expected :). This is my code - the idea is very simple to make every paragraph red:
And this is result: As you can see, the number of unpainted lines at the end of the document is increasing. The console data shows that not all lines are being passed to the styler. I use RichTextFX 0.11.5. Could you say how to fix it? |
@Jugen Could you say, what is the proper way to update styles when this approach is used? For example when it is necessary to update only styles for paragraphs 1 - 100? I tried this way:
but it didn't work. I also tried to use absolute position and |
Suppose I have a document with a huge number of paragraphs (e.g., 10,000,000+). It makes no sense to add styles to all paragraphs at once for performance reasons. What is the correct approach to:
Is there a built-in mechanism in RichTextFX for this, or do I need a custom solution?
The text was updated successfully, but these errors were encountered: