Unfortunately, the simple answer is that it's not possible to hyperlink directly within a textarea.
The workaround is to utilize a div element instead. You can also make use of contenteditable attribute to enable users to edit the contents of the div.
For more information on this topic, you can check out this resource.
However, please note that inserting hyperlinks into an editable div will only work if the user pastes a hyperlink. Otherwise, you may need to implement key events and regex to detect manually entered hyperlinks.
Depending on your specific needs, you might want to avoid allowing hyperlinking within the text area. Instead, consider displaying a preview below the input field (similar to Stack Overflow) and using code to automatically hyperlink URLs.
If desired, there are also third-party libraries available such as QuillJS and TinyMCE for additional functionality.