bootstrap-wysihtml5 icon indicating copy to clipboard operation
bootstrap-wysihtml5 copied to clipboard

Change editor value

Open jalalomary opened this issue 12 years ago • 3 comments

Hi,

Can you please help in showing me how to change editor value after initialization, i tried :

$('#some-textarea').val('Some HTML code');

But this didn't work, editor kept the old value, also re-initializing it again will duplicate the toolbar and will not change the value

Thanks

jalalomary avatar Nov 20 '12 03:11 jalalomary

Would also like to know how ist it done.

ShintoTuna avatar Dec 13 '12 09:12 ShintoTuna

Hi jalalomary ,

try this var $editor = $('#some-textarea').wysihtml5() $editor.data("wysihtml5").composer.setValue('Some HTML code);

sundna avatar Jan 17 '13 10:01 sundna

@sundna this code still duplicates the toolbar.

jameswebbdesign avatar Jul 10 '17 14:07 jameswebbdesign