nucleos/sonata-ckeditor-bundle

Symfony Bundle 允许使用 CKEditor 进行 sonata 媒体管理。

1.2.0 2024-08-14 17:25 UTC

README

Latest Stable Version Latest Unstable Version License

Total Downloads Monthly Downloads Daily Downloads

Continuous Integration Code Coverage Type Coverage

Symfony Bundle 允许使用 CKEditor 进行 sonata 媒体管理。

文档

安装

1. 使用 Composer 添加依赖

composer require nucleos/sonata-ckeditor-bundle

2. 启用所有 Symfony 环境的包

// bundles.php
return [
    //...
    Nucleos\SonataCKEditorBundle\SonataCKEditorBundle::class => ['all' => true],
];

配置

sonata_ck_editor:
    templates:
        browse: '@SonataCKEditor/browser.html.twig'
        upload: '@SonataCKEditor/upload.html.twig'
    autoconfig: # Can be disabled
        contexts: [default]
        browseRoute: admin_app_media_media_ckeditor_browse
        uploadRoute: admin_app_media_media_ckeditor_upload
        fileProvider: sonata.media.provider.file
        imageProvider: sonata.media.provider.image
        imageContext: default
        imageFormat: null