“lang.link.toolbar 为空或不是对象”当在 IE7 上使用 CKeditor 时

发布于 2024-10-04 09:19:47 字数 889 浏览 4 评论 0原文

我仅在 IE7 中收到此错误。

lang.link.toolbar 为 null 或不是对象

我想我可能在设置语言时不小心删除了一些东西,所以我去了 ckeditor/lang/en.js ,确实有一个 CKEDITOR.lang.en.link.toolbar 正在设置。

我使用 jQuery 适配器设置了实际的 CKEditor,如下所示...

$( '#input-product-description' ).ckeditor(
  function() { /* callback code */ },
  {
  startupFocus: true,
  language: 'en',
  defaultLanguage: 'en',
  removePlugins : 'smiley, about, sourcearea, flash, newpage, pagebreak, popup, preview, stylescombo, table, tabletools, elementspath, save, templates, print, find, font, forms, horizontalrule, justify, format, colorbutton, div, blockquote, indent, clipboard, image, showblocks, wsc' ,
  toolbar :
      [
        ['Undo','Redo'],
        ['Bold','Italic'],
        ['NumberedList','BulletedList']
      ],
   resize_enabled: false   

 });

有谁知道为什么会发生此错误?

I get this error only in IE7.

lang.link.toolbar is null or not an object

I thought I may have accidentally deleted something when setting up the language, so I went to ckeditor/lang/en.js and there was indeed a CKEDITOR.lang.en.link.toolbar being set.

I set up the actual CKEditor using the jQuery adapter like so...

$( '#input-product-description' ).ckeditor(
  function() { /* callback code */ },
  {
  startupFocus: true,
  language: 'en',
  defaultLanguage: 'en',
  removePlugins : 'smiley, about, sourcearea, flash, newpage, pagebreak, popup, preview, stylescombo, table, tabletools, elementspath, save, templates, print, find, font, forms, horizontalrule, justify, format, colorbutton, div, blockquote, indent, clipboard, image, showblocks, wsc' ,
  toolbar :
      [
        ['Undo','Redo'],
        ['Bold','Italic'],
        ['NumberedList','BulletedList']
      ],
   resize_enabled: false   

 });

Does anyone know why this error may occur?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

小…红帽 2024-10-11 09:19:47

如果您想更改 ckEditor 语言,请尝试添加以下内容:
或者您可以在 CKEditor 语言演示 上的多语言界面选项卡中看到以下示例

var editor = CKEDITOR.instances.editorName; // GETTING AN INSTANCE OF THE EDITOR
var editorData = editor ? editor.getData() : initialHtml; // GET THE OLD DATA IF YOU WANT TO REUSE IT
if (editor) {
editor.destroy(); // DESTROY THE OLD EDITOR
}
editor = CKEDITOR.appendTo('demoInside', { language: 'en' }); // add new one to your target
editor.setData(editorData); // set your new data

if you want to change the ckEditor language plz try to add this as the following:
or you can see the following examble from the Multi-language interface tab on CKEditor language demo

var editor = CKEDITOR.instances.editorName; // GETTING AN INSTANCE OF THE EDITOR
var editorData = editor ? editor.getData() : initialHtml; // GET THE OLD DATA IF YOU WANT TO REUSE IT
if (editor) {
editor.destroy(); // DESTROY THE OLD EDITOR
}
editor = CKEDITOR.appendTo('demoInside', { language: 'en' }); // add new one to your target
editor.setData(editorData); // set your new data
南渊 2024-10-11 09:19:47

等编辑准备好后你再打电话怎么样?

InstanceReady 事件

How about you make your call once the editor is ready.

InstanceReady event

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文