I'm loading a portion of an HTML page into a text area so that I can make small changes. All the HTML tags are shown along with the text, which is what I need to happen; I don't want a WYSIWYG editor or anything fancy.
The one thing I want is for line breaks to be shown in the text area in addition to the
Maybe you can filter those first, before showing to
textarea? Something like this, maybe (add newline after the closing tag):
$rawhtml = str_replace(array("</p>", "</h1>"), "\n", $rawhtml);