- Issue created by @juc1
- 🇵🇱Poland salmonek
Hi @juc1
If you want to have ability to add completely custom class in the editor UI then there is no such option.
The link plugin however provide possibility to predefine a set of classes that can be added using checkboxes in the link dialog.
Our module focuses on adding plugins that are not in the Drupal core, so we didn't implemnt that feature here (since Link plugin is in core).
Apparently there is a contrib module that adds possibility to configure predefined link styles: https://www.drupal.org/project/ckeditor_link_styles →
The possibilities on editor side are actually broader (adding other attributes than class). We'll discuss internally if we'll be adding that functionalities to Plugin Pack. - 🇬🇧United Kingdom juc1
Hi salmonek,
> core link plugin
Isn't that for a node field not for CKEditor?
> https://www.drupal.org/project/ckeditor_link_styles →
Yeah that looks like what I meant = define classes in CSS such as a.cta then CKEditor allows the option to apply the class cta to a link.
Thanks...
- 🇵🇱Poland salmonek
Isn't that for a node field not for CKEditor?
Yup, that's too.
What I meant is a CKEditor 5 plugin called link which provides the Link toolbar item. The plugin is a part of a core CKEditor 5 implementation. Thus we didn't thought about it for the Plugin Pack module.
- 🇬🇧United Kingdom juc1
> The plugin is a part of a core CKEditor 5 implementation
So is it part of the Drupal core CKEditor module?
- 🇵🇱Poland salmonek
CKEditor 5 Link plugin itself (https://ckeditor.com/docs/ckeditor5/latest/features/link.html) is available in Drupal core out of the box, no need to install anything contrib. This is why we didn't thought about this in the context pf Plugin Pack module.
However in Drupal core there is no support for Link decorators (attributes) https://ckeditor.com/docs/ckeditor5/latest/features/link.html#custom-lin...)
That's why there is contrib module required for this functionality. - Status changed to Fixed
about 2 months ago 2:42pm 4 October 2024 - 🇵🇱Poland salmonek
@juc1
In the version 1.2.2 of CKEditor 5 Plugin Pack we have added a "Link attributes" submodule.
It provides possibility to set link calsses similar way https://www.drupal.org/project/ckeditor_link_styles → module does, but with addition of possibility to set other link attributes.
You can find configuration guide at https://www.drupal.org/docs/extending-drupal/contributed-modules/contrib... → Automatically closed - issue fixed for 2 weeks with no activity.