function MODULENAME_editor_js_settings_alter(array &$settings) { foreach (array_keys($settings['editor']['formats']) as $text_format_id) { /* if ($settings['editor']['formats'][$text_format_id]['format'] == 'full_html') { */ if ($settings['editor']['formats'][$text_format_id]['editor'] == 'ckeditor5') { $settings['editor']['formats'][$text_format_id]['editorSettings']['config']['heading']['options'] = array( array( 'title' => 'Introduction Paragraph', 'class' => 'iac-introduction', 'model' => 'introparagraph', 'view' => array( 'name' => 'p', 'classes' => 'iac-introduction', ), 'converterPriority' => 'high', ) ); } } }
Everything You Wanted to Know About CKEditor 5 But Were Afraid to Ask