sonata-project / SonataFormatterBundle

Symfony SonataFormatterBundle
https://docs.sonata-project.org/projects/SonataFormatterBundle
MIT License
81 stars 117 forks source link

Change CKEditor browser template #633

Closed romazabelin closed 2 years ago

romazabelin commented 2 years ago

Hi! How can I change ckeditor browser template to custom ? In backend/config/packages/sonata_admin.yaml I such this options:

sonata_formatter:
    default_formatter: text
    formatters:
        markdown:
            service: sonata.formatter.text.markdown
            extensions:
                - sonata.formatter.twig.control_flow
                - sonata.formatter.twig.gist
            #        - sonata.media.formatter.twig #keep this commented unless you are using media bundle.

        text:
            service: sonata.formatter.text.text
            extensions:
                - sonata.formatter.twig.control_flow
                - sonata.formatter.twig.gist
        #        - sonata.media.formatter.twig

        rawhtml:
            service: sonata.formatter.text.raw
            extensions:
                - sonata.formatter.twig.control_flow
                - sonata.formatter.twig.gist
        #        - sonata.media.formatter.twig

        richhtml:
            service: sonata.formatter.text.raw
            extensions:
                - sonata.formatter.twig.control_flow
                - sonata.formatter.twig.gist
        #        - sonata.media.formatter.twig

        twig:
            service: sonata.formatter.text.twigengine
            extensions: [ ] # Twig formatter cannot have extensions
    ckeditor:
        templates:
            browser: 'admin/action/media/ckeditor/browser.html.twig'
            upload: '@SonataFormatter/Ckeditor/upload.html.twig'

browser: 'admin/action/media/ckeditor/browser.html.twig' - but this does not change template. Is it connecting to default '@SonataFormatter/Ckeditor/browser.html.twig'

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.