4

我正在尝试在 CKEditor 4.5.3 上使用 Line Height 插件,但它不起作用。

CKEditor 甚至不会打开。我得到一个应该在的空白空间。

有人可以帮我吗?

这是我的 CKEditor 构建的链接:link

这是我的控制台所说的:

Uncaught TypeError: Cannot read property 'title' of undefined

它指向这个代码行(plugin.js:70):

addCombo( editor, 'lineheight', 'size', editor.lang.lineheight.title, config.line_height, editor.lang.lineheight.title, config.lineHeight_style, 40 );

以下是一些有助于澄清的图像:

错误

代码

PS:Rich Combo 是 Line Height 工作所需的插件,已安装。

4

2 回答 2

2

除了 Rich Combo 插件之外,Line Height 插件还需要另外 4 个插件作为依赖项:

  • 富组合
  • 浮板
  • 控制板
  • 列表块
  • 按钮

在你的config.js

config.extraPlugins = 'lineheight,richcombo,floatpanel,panel,listblock,button';
于 2016-06-23T09:09:54.603 回答
2

我遇到了同样的问题,这是我使用的语言中的一个错误。

在文件中:

ckeditor/plugins/lineheight/lang/pt.js

它具有以下引用语言'af'的内容,它应该是'pt'

CKEDITOR.plugins.setLang('lineheight','af', {
    title: 'linha Altura'
});

更正为:

CKEDITOR.plugins.setLang('lineheight','pt', {
    title: 'linha Altura'
});
于 2019-04-30T00:35:58.580 回答