Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

netlogix/Netlogix.CkEditor.LinkClass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This package is archived

Please consider using other solutions for adding classes to CKEditor Elements in Neos, eg. https://github.com/visol/Visol.Neos.LinkClass

Netlogix.CkEditor.LinkClass

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.