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

Does RTFX provide events? #747

Closed
saifalmutory opened this issue May 12, 2018 · 5 comments
Closed

Does RTFX provide events? #747

saifalmutory opened this issue May 12, 2018 · 5 comments
Labels

Comments

@saifalmutory
Copy link

I need to know the change in InlineCssTextArea
For example: I want to know the change in the height of the text,
There is some code that must be executed whenever the height of the text changes.
Using the key event and checking the ctrl and enter is a bad idea.
I need those events
Any ideas? I will be grateful

@JordanMartinez
Copy link
Contributor

The only changes that occur in RTFX are those via multiPlainTextChanges/multiRichTextChanges/plainTextChanges/richTextChanges and all other Properties found in GenericStyledArea (e.g. wrapTextProperty()).
There isn't a change event specifically for the height of the text because it's hard to know when that changes. The best you could do is use two or more style classes specifically for a text's height and then register a change in the area's style spans whenever one of those style classes gets changed to another.

@saifalmutory
Copy link
Author

saifalmutory commented May 12, 2018

Cases where text height changes :
Change in font size
Change in padding (top, bottom, right, left, between text)
Cut and paste
This makes it harder

@saifalmutory
Copy link
Author

What about providing more events?

@JordanMartinez
Copy link
Contributor

Change in font size

Font size is currently controlled via a CSS style (whether that be area.setStyle(String) or area.getStyleClass().add(String). If you want such an event, you can create it yourself by building on top of RTFX.

Change in padding (top, bottom, right, left, between text)

Assuming you don't mean #749, this is not currently supported. Feel free to submit a PR.

Cut and paste

Once you get the above two done, I don't see why this would be hard since the cut and paste would trigger the necessary changes/events, correct?

@saifalmutory
Copy link
Author

yes ,I got what I want ,Thank you

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

2 participants