'in contenteditable, how to convert urls to links while typing or pasting urls

Is there a way to convert urls into active hyperlinks while editing in contenteditable on the fly, or pasting a url and it automatically converts the url to hyperlink?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source