This service give the ability to convert a plain text to a rich HTML, where it detects urls, emails, hashatgs and phone numbers and convert them to a clickable links (action items).
format.js file in widget header after the
format.js file in control header after the
This function is responsible for converting a plain text to a rich HTML, where it detects urls, emails, hashatgs and phone numbers and convert them to a clickable links (action items) and it also retruns the detected hashtags in the text as an array.
|string||yes||The text that will be converted to html|
|boolean||no||to decide whether to convert urls to action items or to keep them as texts|
|boolean||no||to decide whether to convert emails to action items or to keep them as texts|
|boolean||no||to decide whether to convert phone numbers to action items or to keep them as texts|
|string||no||the type of hashtag to be supported (|
|string||error string, |
|object||contains the converted text to html and the hashtags that was detected in the text as an array|
This service checks if the text is already converted to an html; so if it is already converted, this service will retrun an error.
This function is used with the (
supportedHashtagType = 'custom'), where this function will be invoked when the user clicks on the custom hashtag. Initially, this function logs the clicked hashtag in the console, but the developer can override this function to handle the clicked hashtag in different ways.