Lakion / CmsPlugin

Simple CMS on top of SymfonyCMF for Sylius applications.
http://lakion.com
26 stars 20 forks source link

How it is better to add WYSIWYG for static content? #52

Closed krafas closed 7 years ago

krafas commented 7 years ago

Currently we use egeloen/ckeditor-bundle. How it is better to add wysiwyg to static content of this plugin? I see that StaticContentType is final class, so should we implement our own class? Maybe we can somehow implement this as a feature directly into this plugin?

krafas commented 7 years ago

OK, for now I did it in this way:

Overrided form:

        class: AppBundle\Form\Type\StaticContentType
        arguments:
            - %lakion_cms.model.static_content.class%
            - ["sylius"]
        tags:
            - { name: form.type }

Defined resource:

    resources:
        static_content:
            classes:
                form: AppBundle\Form\Type\StaticContentType
stefandoorn commented 7 years ago

I used a form extension to replace the content form with CKEditor.