【问题标题】:IvoryCKEditorBundle: how to customize toolbar items?IvoryCKEditorBundle:如何自定义工具栏项?
【发布时间】:2016-06-08 11:19:41
【问题描述】:

我需要自定义 Symfony 包 IvoryCKEditorBundle 的工具栏项。

我知道可以通过在this way 中添加项目来自定义工具栏,但是如何编辑项目本身或创建自定义项目?

CKEditor 文档解释了它here,但我不确定如何使用 Symfony IvoryCKEditor 包来做同样的事情。

【问题讨论】:

    标签: javascript php symfony ckeditor bundle


    【解决方案1】:

    一种优雅的方式是先creating a CKEditor plugin,然后loading the plugin into the IvoryCKEditorBundle

    # app/config/config.yml
    ivory_ck_editor:
        default_config: my_config
        configs:
            my_config:
                extraPlugins: "mycustomplugin"
        plugins:
            mycustomplugin:
                path:     "/bundles/mybundle/mycustomplugin/"
                filename: "plugin.js"
    

    插件文件夹(在我的示例中为 mycustomplugin)应放在包源(例如 src/MyBundleName/Resources/pubic)的 Resources/public 文件夹下。

    编辑:另外,请注意,如果您需要安装多个插件,extraPlugins 列表应该用逗号分隔没有空格,例如:

    extraPlugins: "mycustomplugin1,mycustomplugin2,mycustomplugin3"
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-08-20
      • 2015-05-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-10-01
      相关资源
      最近更新 更多