diff --git a/modules/ckeditor5_plugin_pack_word_count/src/Plugin/CKEditor5Plugin/WordCount.php b/modules/ckeditor5_plugin_pack_word_count/src/Plugin/CKEditor5Plugin/WordCount.php index 585c046..5137707 100644 --- a/modules/ckeditor5_plugin_pack_word_count/src/Plugin/CKEditor5Plugin/WordCount.php +++ b/modules/ckeditor5_plugin_pack_word_count/src/Plugin/CKEditor5Plugin/WordCount.php @@ -85,9 +85,12 @@ class WordCount extends CKEditor5PluginDefault implements CKEditor5PluginConfigu /** * {@inheritdoc} */ - public function submitConfigurationForm(array &$form, FormStateInterface $form_state): void { - $this->setConfiguration($form_state->cleanValues()->getValues()); - } + public function submitConfigurationForm(array &$form, FormStateInterface $form_state): void { + $values = $form_state->cleanValues()->getValues(); + + $values['word_count_enabled'] = isset($values['word_count_enabled']) ? !empty($values['word_count_enabled']) : FALSE; + $this->setConfiguration($values); + } /** * {@inheritdoc}