最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How to use Line Height plugin in CKEditor? - Stack Overflow

programmeradmin5浏览0评论

I'm trying to use the Line Height plugin on CKEditor 4.5.3 but it won't work.

CKEditor won't even open. I get a blank space where it should be.

Could someone please help me?

Here's a link to my CKEditor build: link

Here's what my console says:

Uncaught TypeError: Cannot read property 'title' of undefined

And it points to this code line (plugin.js:70):

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

Here are some images to help clarify:

PS: Rich Combo, a required plugin for Line Height to work, is installed.

I'm trying to use the Line Height plugin on CKEditor 4.5.3 but it won't work.

CKEditor won't even open. I get a blank space where it should be.

Could someone please help me?

Here's a link to my CKEditor build: link

Here's what my console says:

Uncaught TypeError: Cannot read property 'title' of undefined

And it points to this code line (plugin.js:70):

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

Here are some images to help clarify:

PS: Rich Combo, a required plugin for Line Height to work, is installed.

Share Improve this question asked Aug 27, 2015 at 21:14 Alisson BezerraAlisson Bezerra 3212 silver badges13 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 3

I went through the same problem, and it was a bug in the language I was using.

In the file:

ckeditor/plugins/lineheight/lang/pt.js

It had the content below referencing the language 'af' being that it should be 'pt'

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

Corrected to:

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

Line Height plugin apart from the Rich Combo plugin requires 4 more plugins as dependencies:

  • richbo
  • floatpanel
  • panel
  • listblock
  • button

and in your config.js

config.extraPlugins = 'lineheight,richbo,floatpanel,panel,listblock,button';
发布评论

评论列表(0)

  1. 暂无评论