A class for processing text output and adding clickable hyperlinks.
The LinkProvider wraps the utility functions in a stateful class that can be enabled/disabled and configured with a maximum URL display length.
const provider = new LinkProvider();// Process text with linksconst output = provider.process('See https://example.com');// Disable link processingprovider.setEnabled(false); Copy
const provider = new LinkProvider();// Process text with linksconst output = provider.process('See https://example.com');// Disable link processingprovider.setEnabled(false);
Private
Check if URL linking is enabled
Process text and add hyperlinks to URLs
Process text with truncated URL display
Enable or disable URL linking
Set maximum URL display length
A class for processing text output and adding clickable hyperlinks.
The LinkProvider wraps the utility functions in a stateful class that can be enabled/disabled and configured with a maximum URL display length.
Example