netlogix / ckeditor-linkclass
Extends the CKEditor 5 link editor with the functionality to add preconfigured CSS classes to selected links
Installs: 1 710
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 5
Forks: 0
Open Issues: 0
Language:JavaScript
Type:neos-package
Requires
- neos/neos: *
- neos/neos-ui: ^4.0 || ^5.0 || ^7.0
README
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
- 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'
- 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
.