我正在使用 jQuery 打开一个对话框窗口,其中 textarea 已转换为 CKEditor 的实例。我正在使用 CKEditor 团队提供的 jQuery 适配器,但是当对话框窗口打开时,我无法与编辑器交互(它已创建,但内容空间中写入了“null”,我无法单击任何内容或修改内容)。
这个错误报告似乎说通过使用补丁提供的问题是固定的,但它似乎对我不起作用......
这是我的代码(也许我以编程方式做错了):
HTML:
<div id="ad_div" title="Analyse documentaire">
<textarea id="ad_content" name="ad_content"></textarea>
</div>
我的包含(所有内容都正确包含,但可能是包含订单问题?):
<script type="text/javascript" src="includes/ckeditor/ckeditor.js"></script>
<link rel="stylesheet" type="text/css" href="includes/jquery/css/custom-theme/jquery-ui-1.7.2.custom.css" />
<script type="text/javascript" src="includes/jquery/js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="includes/jquery/js/jquery-ui-1.7.2.custom.min.js"></script>
<script type="text/javascript" src="includes/jquery/plugins/dialog-patch.js"></script>
<script type="text/javascript" src="includes/ckeditor/adapters/jquery.js"></script>
Javascript:
$('#ad_content').ckeditor();
/* snip */
$('#ad_div').dialog(
{
modal: true,
resizable: false,
draggable: false,
position: ['center','center'],
width: 600,
height: 500,
hide: 'slide',
show: 'slide',
closeOnEscape: true,
autoOpen: false
});
$('.analyse_cell').click(function(){
$('#ad_div').dialog('open');
});
编辑:经过进一步测试后,我注意到按下工具栏按钮给了我这个错误:
错误:this.document.getWindow().$ 未定义源文件:includes/ckeditor/ckeditor.js 行:82