【问题标题】:How to use Line Height plugin in CKEditor?如何在 CKEditor 中使用 Line Height 插件?
【发布时间】:2015-08-27 21:14:36
【问题描述】:

我正在尝试在 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 工作所需的插件。

【问题讨论】:

    标签: javascript jquery css plugins ckeditor4.x


    【解决方案1】:

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

    在文件中:

    ckeditor/plugins/lineheight/lang/pt.js
    

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

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

    更正为:

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

    【讨论】:

      【解决方案2】:

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

      • 丰富组合
      • 浮动面板
      • 面板
      • 列表块
      • 按钮

      在你的config.js

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

      【讨论】:

        猜你喜欢
        • 2017-10-16
        • 2021-07-14
        • 2020-05-23
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2010-11-21
        • 1970-01-01
        • 2022-01-08
        相关资源
        最近更新 更多