breadlesscode/neos-simple-editor-extend

Last activity 04 Aug 2021 21 2 2434
composer require breadlesscode/neos-simple-editor-extend

The simlpe way to extend the Neos CMS editor

3.0.0

Version
3.0.0
Type
neos-plugin
Release Date
Dec 15, 2020 21:30
Source
git
Distribution
zip
Requires
GPL-3.0-or-later 7f819522835f212afc02c4f9c0f480e00ed7caf9

Neos simple editor extend

Latest Stable Version Downloads License GitHub stars GitHub watchers

This is a small plugin to simply add some buttons to the Neos CMS CKEditor, without writing any JavaScript code. You only need to compose a YAML-File.

Installation

Most of the time you have to make small adjustments to a package (e.g., the configuration in Settings.yaml). Because of that, it is important to add the corresponding package to the composer from your theme package. Mostly this is the site package located under Packages/Sites/. To install it correctly go to your theme package (e.g.Packages/Sites/Foo.Bar) and run following command:

composer require breadlesscode/neos-simple-editor-extend --no-update

The --no-update command prevent the automatic update of the dependencies. After the package was added to your theme composer.json, go back to the root of the Neos installation and run composer update. Your desired package is now installed correctly.

Demo

result demo image

Example configuration

Neos:
  Neos:
    Ui:
      frontendConfiguration:
        'Breadlesscode.SimpleEditorExtend:Buttons':
          'Test.Test:MyCustomSpan':
            extensionName: 'exampleExtension'
            icon: 'plus-square'
            tooltip: 'Mark the text in color green'
            position: 'before strong'
            formatting:
              tag: 'span'
              classes: 'test-class'
              styles:
                background-color: 'green'
          'Test.Test:MyCustomSpan2':
            extensionName: 'exampleExtension2'
            icon: 'rocket'
            tooltip: 'Mark the text in color red'
            position: 'before exampleExtension'
            formatting:
              tag: 'span'
              classes: 'test-class-2'
              styles:
                background-color: 'red'

Now you can use your new formattings like this:

'Neos.NodeTypes.BaseMixins:TextMixin':
  properties:
    text:
      ui:
        inline:
          editorOptions:
            formatting:
              'Test.Test:MyCustomSpan': true
              'Test.Test:MyCustomSpan2': true

License

The GNU GENERAL PUBLIC LICENSE Version 3. Please see License File for more information.

The content of the readme is provided by Github
The same vendor provides 10 package(s).