cr1zz cr1zz - 6 months ago 132
jQuery Question

jQuery Summernote - Get text back into editor

I got problems getting text back into the summernote editor.

I alrdy tried (but did not work):

$("#EDITsummernote").innerHtml = 'test';


How to do that?

Thank you in advance.

Answer

Since v0.7.0 code() has been deprecated and removed (same story for destroy() method).

You must use $(".summernote").summernote("code", "your text");

Reference: http://summernote.org/getting-started/#get-amp-set-code

After v0.7.0, direct jquery methods, destroy and code were removed for avoiding conflict with other jquery libraries.