Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用 jQuery 将内容动态设置为 bootstrap-wysiwyg 编辑器。我试过了
$('.editor').html() and $('.editor').val()
似乎没有一个人接受
经过很多努力,我找到了路
var editorObj = $("#description").data('wysihtml5'); var editor = editorObj.editor; editor.setValue(data.description);
尝试这个,$("#editor").html("I am a <b>bold</b> text.");
$("#editor").html("I am a <b>bold</b> text.");
所见即所得编辑器将显示为预期的内容,如下所示
“我是粗体字”