AlloyEditor Edit Source

Install Package

eZ Platform AlloyEditor Source

This bundle allows editing the HTML source code of the fields managed by eZ Platform Online Editor. So it provides "disable editor" functionality from eZ Publish Legacy.

Installation

  1. Require via composer
    composer require contextualcode/ezplatform-alloyeditor-source
  2. Add bundle in app/AppKernel.php:
    public function registerBundles()
    {
        $bundles = [
            ...
            new ContextualCode\EzPlatformAlloyEditorSourceBundle\EzPlatformAlloyEditorSourceBundle(),
        ];
  3. Clear caches:
    php bin/console cache:clear
  4. Install assets:
    php bin/console assets:install web --symlink --relative
  5. Compile assets:
    yarn encore dev
  6. Clear browser caches and enjoy!

Using CKEditor plugins in eZ Platform UI

This bundle is a good showcase for using CK Editor plugins in eZ Platform. It relies on Source Dialog CKEditor add-on.

If you want to make a similar bundle for any other CKEditor add-on, just follow these steps:

  1. Add CKEditor add-on to your source: src/bundle/Resources/public/js/alloyeditor/plugins/sourcedialog.
  2. Create an external source for previously added add-on: src/bundle/Resources/public/js/alloyeditor/externals.js
  3. Add plugin external source to encore configuration: src/bundle/Resources/encore/ez.config.manager.js
  4. Register added plugin in eZ Platform Admin UI: src/bundle/Resources/config/ezrichtext.yml
  5. In most cases, CKEditor plugins have their buttons, but they require minor CSS fixes to be nice and shiny in eZ Platform Admin UI. Alternatively, you can create a new button: src/bundle/Resources/public/js/alloyeditor/buttons/source.js
  6. Enable button from the previous step in desired Online Editor toolbars: src/bundle/Resources/config/ezrichtext.yml

You can find more details at Extending eZ Platform Online Editor blog post.

blog comments powered by Disqus

Created by:

Categories:

Downloads:

190

Stars:

0

Forks:

0

Created:

Updated: