- ๐บ๐ธUnited States justcaldwell
The approach in #16 worked well for us โ thanks @aludescher!
One note: be sure to add
'converterPriority' => 'high'
to your new options, e.g.:$options[] = [ 'model' => 'headingFancy', 'view' => [ 'name' => 'h2', 'classes' => 'fancy', ], 'title' => t('Heading 2 (fancy)'), 'class' => 'ck-heading_heading2_fancy', 'converterPriority' => 'high', ];
Without that, added options likely won't still be selected on subsequent edits of the content. Standard options that operate on the same element (in this case 'Heading 2') will take precedence.
- ๐บ๐ธUnited States justcaldwell
@taote you might be missing a use statement for CKEditor5PluginDefinition at the top of your module file:
use Drupal\ckeditor5\Plugin\CKEditor5PluginDefinition;