Untitled
plain_text
2 months ago
568 B
1
Indexable
Never
/** * Implements template_preprocess_HOOK() for form templates. */ function YOUR_THEME_preprocess_form_element(&$variables) { // Check if the form element is of type 'text_format' and has the attribute to disable CKEditor shim. if ($variables['element']['#type'] === 'text_format' && isset($variables['element']['#attributes']['data-ckeditor-shim-disabled'])) { // Get the CSS array and remove the CKEditor v4-shims.css file. $css = &$variables['element']['#attached']['library']; $css = array_diff($css, ['ckeditor/drupal.ckeditor.v4-shims']); } }