如何在CKEditor中使用Line Height插件?

问题描述 投票:3回答:2

我正在尝试在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 );

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

error

code

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

javascript jquery css plugins ckeditor4.x
2个回答
2
投票

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

  • richcombo
  • floatpanel
  • 面板
  • listblock
  • 按键

并在您的config.js

config.extraPlugins = 'lineheight,richcombo,floatpanel,panel,listblock,button';

2
投票

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

在文件中:

ckeditor/plugins/lineheight/lang/pt.js

它的内容在下面引用了“应该是'pt'的语言”

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

更正:

CKEDITOR.plugins.setLang('lineheight','pt', {
    title: 'linha Altura'
});
© www.soinside.com 2019 - 2024. All rights reserved.