SO - 25562116
by Arun P Johny
HTML
<textarea>
<p>Hello World!</p>
</textarea>
JavaScript
$.fn.wysiwyg = function (options) {
var $frame = $("<iframe>")
var e = $(this).replaceWith($frame);
console.log($frame[0].contentDocument);
};
$("textarea").wysiwyg();