duannaxin9975
2016-06-08 11:19
浏览 70
已采纳

IvoryCKEditorBundle:如何自定义工具栏项?

I need to customize the items of the toolbar of the Symfony bundle IvoryCKEditorBundle.

I know that the toolbar can be customized by adding items to it in this way, but how can I edit an item itself or create a custom item?

The CKEditor documentation explains it here, but I'm not sure how to do the same using the Symfony IvoryCKEditor bundle.

图片转代码服务由CSDN问答提供 功能建议

我需要自定义Symfony包IvoryCKEditorBundle工具栏的项目。 < p>我知道可以通过在这个中添加项目来自定义工具栏 方式,但是如何编辑项目本身或创建自定义项目?

CKEditor文档解释了它这里,但我不知道如何使用Symfony IvoryCKEditor包做同样的事情。

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • drygauost253590142 2016-06-08 15:05
    已采纳

    One elegant way could be by first creating a CKEditor plugin, and then 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"
    

    the plugin folder (in my example mycustomplugin) should be placed under the Resources/public folder of the bundle source (e.g. src/MyBundleName/Resources/pubic).

    Edit: also, be aware that if you need to install more than one plugin, the extraPlugins list should be separated by comma without space, like:

    extraPlugins: "mycustomplugin1,mycustomplugin2,mycustomplugin3"
    
    评论
    解决 无用
    打赏 举报

相关推荐 更多相似问题