jQuery Summernote - Get text back into editor

前端 未结 6 981
鱼传尺愫
鱼传尺愫 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:09

    To set:

    $('#summernote').summernote('code', ' hello world ');
    

    To get:

    var get_code = $('#summernote').summernote('code');
    

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

提交回复
热议问题