Manage links in EnrichedTextInput
mainLinks can be handled in two ways:
- Automatic detection: The component automatically detects URLs. You can customize this behavior using the
linkRegexprop. - Manual application: Use the
setLinkmethod on the input ref. You can derive thestart,end, andtextarguments from theonChangeSelectionevent payload to apply a link to the user's current selection.
Passing a different text argument to setLink than what is currently selected will replace the selected text with the new text before applying the link.