Drupal 8.4.x
I am trying to add custom formats to the ckeditor dropdown.
Having the Geshi Filter module installed it would be nice to have the tags associated with the different languages available as a format option for users.
Following a reply here: https://drupal.stackexchange.com/a/244331/79805, I have success adding the "div" tag, but seem unable to add anything else like a "css" tag or even a "span" tag.
Is it possible to add custom tags to the format list?
This is the function running right now from user @rémy:
function ckeditor_add_format_tags_editor_js_settings_alter(array &$settings) {
foreach (array_keys($settings['editor']['formats']) as $text_format_id) {
if ($settings['editor']['formats'][$text_format_id]['editor'] === 'ckeditor') {
$settings['editor']['formats'][$text_format_id]['editorSettings']['format_tags'] .= ";div";
}
}
}