breadlesscode/neos-simple-editor-extend

Last activity on 06 December 2022
  • 21
  • 2
  • 8612
composer require breadlesscode/neos-simple-editor-extend

The simlpe way to extend the Neos CMS editor

v3.0.1

The simlpe way to extend the Neos CMS editor

Version
v3.0.1
Type
neos-plugin
Release Date
Apr 13, 2022, 8:35:56 am
Source
git
Distribution
zip
Requires
Requires (dev)
None
Suggest
None
Provides
None
Conflicts
None
Replaces
None
GPL-3.0-or-later 8d860c128ce084a853fe3c7b48ab32a24a83a373

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 9 package(s).