I have a small problem, what happens is that I'm doing a forum in laravel, and where they are supposed to put the description or code integrated e tinymce for it, to save the data in the DB is not the problem, what I'm doing is making a select in the controller and I send it to the view with all the data as an array, which I go through with a forech but this shows me with the tags as it was saved in the db and for this I use this code and it shows me in plain text, what I want:
@foreach($mensajes as $m)
<textarea id="resp-hide" class="ultima-respuesta-hide" style="display: none">{{ $m->comment }}</textarea>
<p id="ult-respuesta" class="ultima-respuesta"></p>
@endforeach
This script is what translates me to plain text so to speak
<script>
. var traducirHTML = document.getElementById("resp-hide").value;
document.getElementById("ult-respuesta").innerHTML = traducirHTML;
</script>
That shows me only the text and it's perfect, but when you enter another comment it does not work anymore, it only works with one comment, it does not show anything if it's more than one comment, someone knows how I do to show me the other comments also but without the labels? Is there another way?