function CKEditor5::submitConfigurationForm
Same name in other branches
- 10 core/modules/ckeditor5/src/Plugin/Editor/CKEditor5.php \Drupal\ckeditor5\Plugin\Editor\CKEditor5::submitConfigurationForm()
- 11.x core/modules/ckeditor5/src/Plugin/Editor/CKEditor5.php \Drupal\ckeditor5\Plugin\Editor\CKEditor5::submitConfigurationForm()
Overrides EditorBase::submitConfigurationForm
File
-
core/
modules/ ckeditor5/ src/ Plugin/ Editor/ CKEditor5.php, line 923
Class
- CKEditor5
- Defines a CKEditor 5-based text editor for Drupal.
Namespace
Drupal\ckeditor5\Plugin\EditorCode
public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
// @see ::validateConfigurationForm()
$editor = $form_state->get('editor');
// Prepare the editor settings for editor_form_filter_admin_format_submit().
// This strips away unwanted form values too, because those never can exist
// in the already validated Editor config entity.
$form_state->setValues($editor->getSettings());
parent::submitConfigurationForm($form, $form_state);
if ($form_state->get('used_smart_default_settings')) {
$format_name = $editor->getFilterFormat()
->get('name');
$this->logger
->info($this->t('The migration of %text_format to CKEditor 5 has been saved.', [
'%text_format' => $format_name,
]));
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.