1

有人成功地将 CKFinder 集成到 CMS 插件吗?我使用 ckfinder/ckfinder-symfony-bundle,安装、下载、安装资产、添加到默认 bitbag_sylius_cms_plugin 配置

fos_ck_editor:
    default_config: bitbag_sylius_cms_plugin
        configs:
            bitbag_sylius_cms_plugin:
                extraPlugins: 
                    - "media"
                    - "ckfinder" 
    plugins:
        ckfinder:
            path: "/bundles/cksourceckfinder/ckfinder/"
            filename: "ckfinder.js"
        
    twig:
        form_themes:
            - '@FOSCKEditor/Form/ckeditor_widget.html.twig'

所以整个配置看起来像

fos_ck_editor:
    default_config: bitbag_sylius_cms_plugin
    configs:
        bitbag_sylius_cms_plugin:
            toolbar: bitbag_sylius_cms_plugin
            extraPlugins:
                - media
                - ckfinder
    plugins:
        media:
            path: /bundles/bitbagsyliuscmsplugin/js/ckeditor-plugins/media/
            filename: plugin.js
        ckfinder:
            path: /bundles/cksourceckfinder/ckfinder/
            filename: ckfinder.js
    toolbars:
        configs:
            bitbag_sylius_cms_plugin:
                - '@standard.clipboard'
                - '@standard.editing'
                - '@standard.links'
                - '@standard.insert'
                - '@standard.tools'
                - '@standard.document'
                - /
                - '@standard.basic_styles'
                - '@standard.paragraph'
                - '@standard.about'
        items:
            standard.insert:
                - Image
                - Media
                - Table
                - HorizontalRule
                - SpecialChar
    enable: true
    async: false
    auto_inline: true
    inline: false
    autoload: true
    jquery: false
    require_js: false
    input_sync: false
    base_path: bundles/fosckeditor/
    js_path: bundles/fosckeditor/ckeditor.js
    jquery_path: bundles/fosckeditor/adapters/jquery.js
    styles: {  }
    templates: {  }
    filebrowsers: {  }

但它在浏览器控制台中因错误而崩溃,并且 ckeditor 不可见 在此处输入图像描述

干杯,彼得

4

0 回答 0