I need to be able to render some HTML tags inside a textarea (namely , , , ) but textareas only interpret their content as text. Is
This is not possible to do with a textarea. What you are looking for is an content editable div, which is very easily done:
jsFiddle
div.editable {
width: 300px;
height: 200px;
border: 1px solid #ccc;
padding: 5px;
}
strong {
font-weight: bold;
}
This is the first line.
See, how the text fits here, also if
there is a linebreak at the end?
It works nicely.
Great.