Loading core/modules/ckeditor/src/Plugin/CKEditorPlugin/Internal.php +6 −5 Original line number Diff line number Diff line Loading @@ -116,8 +116,8 @@ public function getConfig(Editor $editor) { // Add the format_tags setting, if its button is enabled. $toolbar_buttons = CKEditorPluginManager::getEnabledButtons($editor); if (in_array('Format', $toolbar_buttons)) { $config['format_tags'] = $this->generateFormatTagsSetting($editor); if (in_array('Format', $toolbar_buttons) && $format_string = $this->generateFormatTagsSetting($editor)) { $config['format_tags'] = $format_string; } return $config; Loading Loading @@ -344,14 +344,15 @@ public function getButtons() { * @param \Drupal\editor\Entity\Editor $editor * A configured text editor object. * * @return array * An array containing the "format_tags" configuration. * @return string|false * A string containing the "format_tags" configuration or FALSE if the * editor has not an associated filter format. */ protected function generateFormatTagsSetting(Editor $editor) { // When no text format is associated yet, assume no tag is allowed. // @see \Drupal\editor\EditorInterface::hasAssociatedFilterFormat() if (!$editor->hasAssociatedFilterFormat()) { return []; return FALSE; } $format = $editor->getFilterFormat(); Loading core/modules/editor/tests/src/FunctionalJavascript/EditorAdminTest.php +1 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,7 @@ public function testEditorSelection() { $this->assertNotEmpty($assert_session->waitForText('sulaco')); $page->selectFieldOption('editor[editor]', 'ckeditor'); $this->assertNotEmpty($this->assertSession()->waitForElementVisible('css', 'ul.ckeditor-toolbar-group-buttons')); $this->assertNotEmpty($this->assertSession()->waitForElementVisible('css', '#ckeditor-plugin-settings')); $page->pressButton('Save configuration'); // Test that toggling the editor selection off and back on works. Loading Loading
core/modules/ckeditor/src/Plugin/CKEditorPlugin/Internal.php +6 −5 Original line number Diff line number Diff line Loading @@ -116,8 +116,8 @@ public function getConfig(Editor $editor) { // Add the format_tags setting, if its button is enabled. $toolbar_buttons = CKEditorPluginManager::getEnabledButtons($editor); if (in_array('Format', $toolbar_buttons)) { $config['format_tags'] = $this->generateFormatTagsSetting($editor); if (in_array('Format', $toolbar_buttons) && $format_string = $this->generateFormatTagsSetting($editor)) { $config['format_tags'] = $format_string; } return $config; Loading Loading @@ -344,14 +344,15 @@ public function getButtons() { * @param \Drupal\editor\Entity\Editor $editor * A configured text editor object. * * @return array * An array containing the "format_tags" configuration. * @return string|false * A string containing the "format_tags" configuration or FALSE if the * editor has not an associated filter format. */ protected function generateFormatTagsSetting(Editor $editor) { // When no text format is associated yet, assume no tag is allowed. // @see \Drupal\editor\EditorInterface::hasAssociatedFilterFormat() if (!$editor->hasAssociatedFilterFormat()) { return []; return FALSE; } $format = $editor->getFilterFormat(); Loading
core/modules/editor/tests/src/FunctionalJavascript/EditorAdminTest.php +1 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,7 @@ public function testEditorSelection() { $this->assertNotEmpty($assert_session->waitForText('sulaco')); $page->selectFieldOption('editor[editor]', 'ckeditor'); $this->assertNotEmpty($this->assertSession()->waitForElementVisible('css', 'ul.ckeditor-toolbar-group-buttons')); $this->assertNotEmpty($this->assertSession()->waitForElementVisible('css', '#ckeditor-plugin-settings')); $page->pressButton('Save configuration'); // Test that toggling the editor selection off and back on works. Loading