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

Looking for updated demo on creating hyperlink #546

Closed
stevedefazio opened this issue Jul 21, 2017 · 9 comments
Closed

Looking for updated demo on creating hyperlink #546

stevedefazio opened this issue Jul 21, 2017 · 9 comments

Comments

@stevedefazio
Copy link

I tried to create a hyperlink via the demo code in #283 , however when I copied the code I got a Cannot Infer Type Arguments on the StyledTextArea. I'm wondering if the way to do this has changed in the past year.

I'm trying to do much the same thing. When the user types something that looks like a link, I want it to be ctrl-clickable.

PS Big fan of this library. I don't know how a rich text editor isn't included in JavaFX out of the box.

@JordanMartinez
Copy link
Contributor

JordanMartinez commented Jul 21, 2017

Yes, the code has probably changed since then.

Do you simply want the hyperlink to appear as a hyperlink? Or do you want clicking it to also open a web browser to that specific link? The former is easier as you can just extend StyledTextArea. If you want the latter, you'll need to implement Hyperlink as a custom object and use GenericStyledArea. Additional modifications may be necessary.> , too

@stevedefazio
Copy link
Author

It would need to be clickable., otherwise yes it would be a simple thing to do with css.

@JordanMartinez
Copy link
Contributor

Read through this wiki page if you haven't already, and let me know what problems you encounter. Despite custom object support being implemented, I'm not sure who's actively using that support, nor what issues they have run into. Your situation would provide a good case to improve that process.

@JordanMartinez
Copy link
Contributor

JordanMartinez commented Jul 21, 2017

Also, the RichText demo uses custom objects to display images in the text. I'd look at that to get an initial idea for how to implement your custom area.

@stevedefazio
Copy link
Author

Is there javadoc available? I'm looking at the RichTextFX demo, but the GenericStyledArea in there is created with more code than I'm comfortable blindly copy+pasting. I'm also thinking it might be simpler to do a workaround, where a keyboard shortcut takes me to the link the cursor is on. That code is pretty clear in the demos.

@JordanMartinez
Copy link
Contributor

JordanMartinez commented Jul 28, 2017 via email

@stevedefazio
Copy link
Author

stevedefazio commented Jul 28, 2017 via email

@JordanMartinez
Copy link
Contributor

JordanMartinez commented Jul 31, 2017

Hmmm... I think we should provide a demo that does this since the RichTextDemo is a bit too cluttered and since hyperlink support has been brought up multiple times...

@JordanMartinez
Copy link
Contributor

See #550.

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

2 participants