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

Can't Set Value of Editor

Open stationkeeping opened this issue 11 years ago • 5 comments

var element = $("#example");
element.wysihtml5();
var wysihtml5 = editBody.data("wysihtml5");
var editor = wysihtml5.editor;
editor.setValue("TEST"); // Fails silently. Text is not set.

stationkeeping avatar Mar 26 '13 18:03 stationkeeping

I think var wysihtml5 = editBody.data("wysihtml5"); should be var wysihtml5 = element.data("wysihtml5");

So $("#example").data("wysihtml5").editor.setValue("TEST");

jsodeman avatar Mar 29 '13 03:03 jsodeman

What porblem if $("#Description").data('wysihtml5').editor = undefined. $("#Description").data('wysihtml5') is Wysihtml5 ? Thanks.

AlexandrM avatar Jan 28 '15 12:01 AlexandrM

$("#example").data('wysihtml5').editor always returns undefined, so unable to set value. Is there any other method to get access to editor / set value?

anjit6 avatar Jul 06 '15 05:07 anjit6

Reverted back to v0.3.3 and it works fine now. Might be some problem with master version.

anjit6 avatar Jul 06 '15 06:07 anjit6

Reverting to v0.3.3 solved the problem for me as well.

FriesFlorian avatar Feb 08 '16 14:02 FriesFlorian