繁体   English   中英

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

[英]How to use Line Height plugin in CKEditor?

我正在尝试在CKEditor 4.5.3上使用Line Height插件,但是它将无法正常工作。

CKEditor甚至无法打开。 我在应该有的地方留了空白。

有人可以帮我吗?

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

这是我的控制台说的:

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正常工作所需的插件。

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

  • 里科博
  • 浮板
  • 面板
  • 列表块
  • 纽扣

并在您的config.js

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

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

在文件中:

ckeditor/plugins/lineheight/lang/pt.js

它的内容在下面引用了语言“ af”,因为它应该是“ pt”

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

更正为:

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM