jQuery Summernote - Get text back into editor

前端 未结 6 1020
鱼传尺愫
鱼传尺愫 2021-01-01 12:39

I got problems getting text back into the summernote editor.

I already tried (but did not work):

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


        
6条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-01 13:02

    None of the Solutions works for me until I did this.

    Let's say you have initialized summernote something like this in which I have two classes .summernote_custom was used $('.summernote_rpt').summernote(options);

    when the entire page loads and when I wanted to update the summernote value using js I used $('.summernote_rpt').summernote('code','data');

提交回复
热议问题