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

RichTextFX Editor #2

Open
Jugen opened this issue Nov 15, 2022 · 6 comments
Open

RichTextFX Editor #2

Jugen opened this issue Nov 15, 2022 · 6 comments
Labels

Comments

@Jugen
Copy link

Jugen commented Nov 15, 2022

Hi Andy, just wanted to bring the RichTextFX project to your attention in terms of being able to handle very large text models.

@Jugen
Copy link
Author

Jugen commented Nov 15, 2022

Here's an editor JeditFX that may be of interest to you. (Haven't tried it)
It uses the RichTextFX library I mentioned before.

@andy-goryachev
Copy link
Owner

Of course I know about RichTextFX, there is even a reference to it in the Readme file in my other project https://github.com/andy-goryachev/FxEditor

The main issue with RichTextFX and my other project is that they both are based on Text/TextFlow, and will grind to a halt when trying to render long text lines found in log files. Think a million characters. As a result, this project was born, which renders to a Canvas using a monospace grid.

So in a sense this issue is logged against a wrong project, but thank you nevertheless! Incidentally, is there anything in you wish was added to or made public in javafx, in the context of rich text editor?

@Jugen
Copy link
Author

Jugen commented Nov 16, 2022

Okay great. I didn't know about the JavaFX PrismTextLayout issue, but it does make sense.
So yeah, I agree if your lines are extremely, extremely long then what you are trying in FxTextEditor is probably the way to go.
(Originally I thought you were just dealing with the many, many lines issue.)

is there anything you wish was added to or made public in javafx

Well it would be nice if the HtmlEditor toolbar's visibility could be set on/off, and if the toolbar was customizable (adding/removing buttons).

@andy-goryachev
Copy link
Owner

Thank you @Jugen . I looked at HTMLEditor - you are right, it is not extensible. The best bet is to write your own skin, but that effort quickly spins out of control.
I hope to change that, specifically in terms of extensibility - it is unexpectedly a bit of uphill battle.

@sirop
Copy link

sirop commented Dec 31, 2022

@andy-goryachev
Sorry for hijacking this isssue, but have you got some stats about RAM usage in case of very big files ( more than 10^6 lines) ?

Thanks.

@andy-goryachev
Copy link
Owner

@sirop :
Good question!
Unless there are memory leaks, neither FxEditor nor FxTextEditor create a lot of objects in memory - only what's visible and some cache. If one uses an off-heap model (i.e. memory-mapped file or some such) the RAM requirements should be pretty low. But I don't have any data to back it up, except that I've been using FxTextEditor in a project https://github.com/andy-goryachev/AccessPanelPublic for a number of years and it does not have memory leaks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants