vineri, 28 octombrie 2011

TinyMCE add content - add HTML

Here's the plain simple method to insert some HTML into your tinyMCE *textarea*



html = '<br><br><a href="gourl"><img src="someimageurl" border=0 alt=""></a>';
document.getElementById('#elm1').tinymce().execCommand('mceInsertContent',false,html);


Where id_blog_body is your textarea's ID attribute.


<textarea id="elm1" class="tinymce"></textarea>

Niciun comentariu:

Trimiteți un comentariu