所见即所得编辑器在引导模式中不起作用,因为它在创建模式之前触发.. 或其他东西。所以最好的方法是在所见即所得编辑器之前触发模态。
function showmymodal(){
$('#modal').modal('show');
$("#modal").html(' <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel">modal header</h3></div>
<div class="modal-body">
<textarea id="textarea"></textarea>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
</div>
</form>');
$('#textarea').wysihtml5({
"font-styles": true,
"emphasis": true,
"lists": true,
"html": false,
"link": true,
"image": true,
"color": true
});
}
你可以在
教程网站上查看