Text-area reading HTML not as text?
I .append a string created by some jQuery, the string generates HTML
markup, when I insert it into the text-area it shows in firebug, but will
not show in the actual text-area. I assume it's doing this because it
reads it as HTML and not text.
Here is a example.
var classesHtmlString = jQuery(".generator-attr:checked").map(function
() {
var $this = jQuery(this);
return $this.val();
}).get().join(" ");
var htmlString = '<div class="'+classesHtmlString+'">';
jQuery('#generator-html-result').val(htmlString);
var shortcodeHTML = jQuery('#generator-html-result').val();
Then I .append it to the text-area I want, I will provide more if
necessary but I think perhaps appending HTML to a text-area doesn't allow
it to read it as text. I googled this but couldn't find much.
No comments:
Post a Comment