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

How to add a custom action to a decorated text? #355

Open
joehei opened this issue Jul 16, 2024 · 1 comment
Open

How to add a custom action to a decorated text? #355

joehei opened this issue Jul 16, 2024 · 1 comment

Comments

@joehei
Copy link

joehei commented Jul 16, 2024

I would like to highlight some text like a hyperlink, but instead of opening the link something different should happen when clicked on it.

How can this be done? Is there an example?

Many thanks

@timoreichen
Copy link

richtextArea.setLinkCallbackFactory(link -> {
    System.out.println("Do your custom action.");
    return null; // No further action is needed
});

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