【问题标题】:React Froala Editor doesn't show paragraph drop downReact Froala Editor 不显示段落下拉菜单
【发布时间】:2020-10-20 12:56:09
【问题描述】:

我将 React Froala 编辑器集成到我的网站。 这是一个简单的项目,我想显示段落选择下拉菜单。 但它不起作用。 和版本有关吗?

this.state = {
    model: ``,
    tags: [],
    config: {
        theme: 'foobar',
        heightMax: 800,
        height: 800,
        toolbarButtons: ['bold', 'italic', 'underline', 'strikeThrough', 'fontFamily', 'fontSize', '|', 'paragraphStyle', 'paragraphFormat', 'align', 'undo', 'redo', 'html']
    }
}



<FroalaEditorComponent 
    model={this.state.model}
    onModelChange={this.onChange}
    config={this.state.config}
/>

【问题讨论】:

  • 免费版可能没有该功能。

标签: reactjs froala


【解决方案1】:

似乎缺少插件。尝试在您的组件中导入插件:

import 'froala-editor/js/plugins.pkgd.min.js';

【讨论】:

    【解决方案2】:

    问题可能与您使用的 froala 版本有关。 请使用

    更新Froala版本

    npm 更新 froala-editor

    所有选项在试用版中也可用。 相同的选项适用于 v3.1.0,请在下面查看。

    Froala editor

    【讨论】:

      猜你喜欢
      • 2022-08-15
      • 2012-05-27
      • 2022-01-01
      • 1970-01-01
      • 2013-08-12
      • 1970-01-01
      • 2019-07-17
      • 1970-01-01
      相关资源
      最近更新 更多