如果我在基于Bootstrap模板的HTML页面中使用CKEditor插件,它运作得很好。但是,如果我像这样在Bootstrap Modal中插入编辑器
<!-- Modal -->
<div class="modal fade" id="modalAddBrand" tabindex="-1" role="dialog" aria labelledby="modalAddBrandLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="modalAddBrandLabel">Add brand</h4>
</div>
<div class="modal-body">
<form>
<textarea name="editor1" id="editor1" rows="10" cols="80">
This is my textarea to be replaced with CKEditor.
</textarea> <script>
CKEDITOR.replace('editor1');
</script>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button id="AddBrandButton" type="button" class="btn btn-primary">Save</button>
</div>
</div>
</div>
</div>
编辑器可以正常工作,但是在弹出的窗口中,所有表单控件都被禁用了,例如,如果你尝试添加链接或图像,你不能插入URL或任何描述,因为输入框被禁用了。
是否有任何解决此问题的方法?
这是一个演示示例:http://jsfiddle.net/7zDay/