5
I would like to know how I can put an HTML code in a textarea, because I have a textarea that receives data from DB dynamically by date filters. ex:
<textarea maxlength="8000" rows="15" style="resize:none; width:100%">{{ctrl.VariavelDB}}</textarea>
utilizo Angularjs, the value of the variable would be like this:
ctrl.VariavelDB = "Lorem bla bla bla <b> negrito </b> bla bla bla <br> <h1> TESTE BAL BLA BLA </h1>"
when it is inserted it shows the code, which I do someone can help me??
Thanks in advance.
Da uma pesquisada em: https://docs.angularjs.org/api/ng/directive/ngBindHtml
– Maurício Krüger
You won’t be able to make the code be interpreted inside the
textarea
, for that use a WYSIWYG editor. I recommend the Quill.– JuniorNunes
Why a
textarea
? Will showhtml
should use a compatible tag, adiv
for example– Ricardo Pontual