tiff / wysihtml5

Open source rich text editor based on HTML5 and the progressive-enhancement approach. Uses a sophisticated security concept and aims to generate fully valid HTML5 markup by preventing unmaintainable tag soups and inline styles.
http://xing.github.com/wysihtml5/
MIT License
6.49k stars 1k forks source link

Can't insert text into rich text editor using JS #515

Open kkaliannan opened 10 years ago

kkaliannan commented 10 years ago

I want to insert some HTML (html_string) into the textarea using:

var wysihtml5Editor = editorElement.data("wysihtml5").editor; wysihtml5Editor.composer.commands.exec("insertHTML", html_string);

However, this only seems to work if I have first clicked on the textarea at least once. Has anyone else seen this? (the JS debugger yields no errors).

emiller12 commented 9 years ago

Yes I am seeing the exact same problem. Did you ever find a solution?

caribesoft commented 9 years ago

I have the same problem with CKEDITOR. Does anyboby found a solution ?