SummerNote insertHtml

前端 未结 5 2014
攒了一身酷
攒了一身酷 2021-02-19 07:43

I have a \'template\' selector, that enables people to change the \'text/html\' of the current textarea.

So when they change templates, I need to update the Summernote H

5条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-19 08:36

    This should actually work

    $('.dialogMessageArea').code('some value you want'); 
    

    NOTE:

    HTML inside code() function has to be a string. I don't think it will work if you are trying to insert an invalid HTML contents.

    Try doing this:

    Create a hidden div and then in your AJAX success method try to insert the datas from the AJAX and then retrieve it using jquery's text() function.

提交回复
热议问题