I have a read-only textarea that I display which acts as my old blog posts (which are editable in a field below it) and I’d like to be able to format it’s contents somewhat. Ideally, I’d like it to look like HTML code, but at the very least, I’d like when the entered a URL, I’d like to display it as a href link.
Are there any best practices for this? Or do I have to process each and look for and format the items I want?
Thanks in advance.
Use a simple div (or paragraph element, or whatever) with the
white-space: preCSS property to display newlines.It is not possible to have an anchor element within a textarea.