为什么不显示ckeditor?
问题描述:
我使用的是标准包。为什么不显示ckeditor?
有JS代码与名称文本:
<script type="text/javascript">
CKEDITOR.replace('text', {
toolbar: [
{ name: 'document', items: [ 'Source', '-', 'NewPage', 'Preview', '-', 'Templates' ] }, // Defines toolbar group with name (used to create voice label) and items in 3 subgroups.
[ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo' ], // Defines toolbar group without name.
'/', // Line break - next group will be placed in new line.
{ name: 'basicstyles', items: [ 'Bold', 'Italic' ] }
]
});
</script>
我得到错误控制台中的Chrome:
Uncaught TypeError: Cannot read property 'options' of undefined
HTML代码:
<div class="text"><textarea name="text" placeholder="Основной текст..."></textarea></div>
答
在过去也有类似的错误与缺失/损坏的语言文件有关。清除浏览器缓存并再次加载CKEditor。如果它无助于检查浏览器中的网络选项卡,并查看语言文件是否正确加载。
你也应该发布HTML。 – sebnukem 2014-10-30 17:08:14
我通过AJAX获得HTML – AllenDegrud 2014-10-30 17:12:54
我们需要查看一个示例,因为很难猜测可能是错误的。这个错误没有说什么。 – Reinmar 2014-10-30 21:59:05