netlogix/ckeditor-linkclass

Extends the CKEditor 5 link editor with the functionality to add preconfigured CSS classes to selected links

Installs: 1 414

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 5

Forks: 0

Open Issues: 2

Language:JavaScript

Type:neos-package

1.0.0 2022-03-07 12:02 UTC

README

This package extends the CKEditor 5 link editor with the functionality to add preconfigured CSS classes to selected links.

Installation

composer require netlogix/ckeditor-linkclass

Usage

  1. Define within the Settings.yaml which CSS classes for links are available for the concrete Neos CMS installation:
Netlogix:
  CkEditor:
    LinkClass:
      options:
        'primaryButton':
          label: 'Primary Button'
          class: 'btn btn-primary'
          position: '10'
        'secondaryButton':
          label: 'Secondary Button'
          class: 'btn btn-secondary'
          position: '20'
  1. Define which previously defined CSS classes can be applied to links in the individual NodeTypes properties of the concrete Neos CMS installation:
'Neos.Demo:Text':
  properties:
    text:
      ui:
        inline:
          editorOptions:
            linking:
              netlogixLinkClass:
                primaryButton: true
                secondaryButton: true

Contributions

You are welcome to contribute by making pull requests, adding issues, etc.

After modifying the JavaScript source code of the package, the JavaScript files can be rebuilt using the following steps:

cd Resources/Private/CKEditor/LinkClass
nvm use
yarn
yarn build

Then commit the modified files including Plugin.js and Plugin.js.map.