This is my textarea :
<div>@Html.TextAreaFor(m => m.Article.ArticleContent, new { @class = "my_textarea", id = "textareaInput" })
and script :
<script type="text/javascript">
$(document).ready(function () {
$('#textareaInput').click(function () {
var htmlStr = $('#textareaInput').val();
$('#textareaInput').val($('<div/>').text(htmlStr).html());
});
});
</script>
when I write <p>some code</p> output is : <p>some code</p> . But I expect : some code.
How may I do this? Thanks.