1 ckeditor5.module | ckeditor5_form_filter_admin_format_form_alter(&$form, &$form_state) |
Implements hook_form_FORM_ID_alter().
Modify the format configuration form to provide a link to upgrade CKEditor 4.
File
- core/
modules/ ckeditor5/ ckeditor5.module, line 1394 - Provides integration with the CKEditor WYSIWYG editor.
Code
function ckeditor5_form_filter_admin_format_form_alter(&$form, &$form_state) {
$editor_info = $form_state['editor_info'];
$format = $form_state['format'];
if ($editor_info && $editor_info['module'] === 'ckeditor' && empty($form_state['input'])) {
backdrop_set_message(t('This text format uses CKEditor 4, which is unsupported. It can be upgraded using the <a href="!url">CKEditor 5 upgrade page</a>.', array('!url' => url('admin/config/content/formats/' . $format->format . '/ckeditor5-upgrade'))), 'info');
}
}