bootbox 的初始化函数在显示对话框后使用一些代码
Init function for bootbox to use some code after showing dialog
我想显示带有引导框的文本区域元素。此文本区域应与 WYSIWYG 编辑器一起使用,它将由
初始化
$('#editor').redactor();
所以我想在显示文本区域的那一刻添加这个。我试过这个:
bootbox.dialog({
title: "Title",
message: '<textarea id="editor"></textarea>',
init: function () {
$('#editor').redactor();
}
});
但这似乎是错误的。
只需添加一个表演活动:
var box = bootbox.dialog({
title: "Title",
message: '<textarea id="editor"></textarea>'
});
box.bind('shown.bs.modal', function(){
$("#editor").redactor();
});
我想显示带有引导框的文本区域元素。此文本区域应与 WYSIWYG 编辑器一起使用,它将由
初始化$('#editor').redactor();
所以我想在显示文本区域的那一刻添加这个。我试过这个:
bootbox.dialog({
title: "Title",
message: '<textarea id="editor"></textarea>',
init: function () {
$('#editor').redactor();
}
});
但这似乎是错误的。
只需添加一个表演活动:
var box = bootbox.dialog({
title: "Title",
message: '<textarea id="editor"></textarea>'
});
box.bind('shown.bs.modal', function(){
$("#editor").redactor();
});