Bootstrap Wysihtml5 Set Value Not Working


Answer :

You should be able to achieve the same using below

$("#<%=txtDescrizioneBreveCategoria.ClientID%>").wysihtml5(); window.describeEditor = window.editor; 

And then later you should can use

describeEditor.setValue(c.DescrizioneBreve, true) 

or use

editorDescrizioneBreve.data("wysihtml5").editor.setValue(c.DescrizioneBreve, true); 

Where editorDescrizioneBreve is the object returned by $("#<%=txtDescrizioneBreveCategoria.ClientID%>").wysihtml5()

PS: Solution based on https://github.com/jhollingworth/bootstrap-wysihtml5/issues/52


For me, this worked:

$('.wysihtml5-sandbox').contents().find('body').html(descr) 

I have only one Wysihtml5 on my page, with multiple, you need to use more precise selector.


Comments

Popular posts from this blog

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android How Can I Convert A String To A Editable