CKEditor 5 is the default WYSIWYG editor used in Drupal 10 to create and edit content. The allowed HTML tags in CKEditor 5 are determined by its configuration and these tags cannot be edited directly from the user interface. In this article, we will show you how to change the allowed HTML tags in CKEditor 5.
Configuring the allowed HTML tags in CKEditor 5
In CKEditor 5, the allowed HTML tags are located in the "Source Editing" plugin settings. To change the allowed HTML tags, you need to add the tags that are not already covered by any other enabled plugin.
If you need to use the tag for italic text, you can add the italics button to the active toolbar.
Adding a custom button to CKEditor 5
If you need to add a custom button to CKEditor 5, you can do so by creating a plugin. The process of creating a plugin is documented on the official Drupal website: https://www.drupal.org/docs/core-modules-and-themes/core-modules/ckeditor-5-module/plugin-and-contrib-module-development.