.../lib/Drupal/ckeditor/CKEditorPluginManager.php | 2 +- .../ckeditor/Plugin/editor/editor/CKEditor.php | 11 +++--- .../Drupal/ckeditor/Tests/CKEditorAdminTest.php | 28 ++++++------- core/modules/editor/editor.module | 41 +++++++++++--------- .../lib/Drupal/editor/Plugin/EditorInterface.php | 4 +- .../lib/Drupal/editor/Tests/EditorAdminTest.php | 26 ++++++------- 6 files changed, 58 insertions(+), 54 deletions(-) diff --git a/core/modules/ckeditor/lib/Drupal/ckeditor/CKEditorPluginManager.php b/core/modules/ckeditor/lib/Drupal/ckeditor/CKEditorPluginManager.php index 4eee1eb..b895fe8 100644 --- a/core/modules/ckeditor/lib/Drupal/ckeditor/CKEditorPluginManager.php +++ b/core/modules/ckeditor/lib/Drupal/ckeditor/CKEditorPluginManager.php @@ -132,7 +132,7 @@ public function injectPluginSettingsForm(array &$form, array &$form_state, Edito $form['plugins'][$plugin_id] = array( '#type' => 'details', '#title' => $definitions[$plugin_id]['label'], - '#group' => 'editor_settings][plugin_settings', + '#group' => 'editor][settings][plugin_settings', ); $form['plugins'][$plugin_id] += $plugin->settingsForm($plugin_settings_form, $form_state, $editor); } diff --git a/core/modules/ckeditor/lib/Drupal/ckeditor/Plugin/editor/editor/CKEditor.php b/core/modules/ckeditor/lib/Drupal/ckeditor/Plugin/editor/editor/CKEditor.php index c1c3efe..2dffa09 100644 --- a/core/modules/ckeditor/lib/Drupal/ckeditor/Plugin/editor/editor/CKEditor.php +++ b/core/modules/ckeditor/lib/Drupal/ckeditor/Plugin/editor/editor/CKEditor.php @@ -50,8 +50,7 @@ function settingsForm(array $form, array &$form_state, Editor $editor) { $manager = drupal_container()->get('plugin.manager.ckeditor.plugin'); $form['toolbar'] = array( - '#type' => 'details', - '#title' => t('Toolbar'), + '#type' => 'container', '#attached' => array( 'library' => array(array('ckeditor', 'drupal.ckeditor.admin')), 'js' => array( @@ -91,15 +90,15 @@ function settingsForm(array $form, array &$form_state, Editor $editor) { */ function settingsFormSubmit(array $form, array &$form_state) { // Modify the toolbar settings by reference. The values in - // $form_state['values']['editor_settings'] will be saved directly by + // $form_state['values']['editor']['settings'] will be saved directly by // editor_form_filter_admin_format_submit(). - $toolbar_settings = &$form_state['values']['editor_settings']['toolbar']; + $toolbar_settings = &$form_state['values']['editor']['settings']['toolbar']; $toolbar_settings['buttons'] = json_decode($toolbar_settings['buttons'], FALSE); // Remove the plugin settings' vertical tabs state; no need to save that. - if (isset($form_state['values']['editor_settings']['plugins'])) { - unset($form_state['values']['editor_settings']['plugin_settings']); + if (isset($form_state['values']['editor']['settings']['plugins'])) { + unset($form_state['values']['editor']['settings']['plugin_settings']); } } diff --git a/core/modules/ckeditor/lib/Drupal/ckeditor/Tests/CKEditorAdminTest.php b/core/modules/ckeditor/lib/Drupal/ckeditor/Tests/CKEditorAdminTest.php index 7f05bc6..72811e9 100644 --- a/core/modules/ckeditor/lib/Drupal/ckeditor/Tests/CKEditorAdminTest.php +++ b/core/modules/ckeditor/lib/Drupal/ckeditor/Tests/CKEditorAdminTest.php @@ -58,9 +58,9 @@ function testAdmin() { $this->assertFalse($editor, 'No Editor config entity exists yet.'); // Verify the "Text Editor" . - $select = $this->xpath('//select[@name="editor"]'); - $select_is_disabled = $this->xpath('//select[@name="editor" and @disabled="disabled"]'); - $options = $this->xpath('//select[@name="editor"]/option'); + $select = $this->xpath('//select[@name="editor[editor]"]'); + $select_is_disabled = $this->xpath('//select[@name="editor[editor]" and @disabled="disabled"]'); + $options = $this->xpath('//select[@name="editor[editor]"]/option'); $this->assertTrue(count($select) === 1, 'The Text Editor select exists.'); $this->assertTrue(count($select_is_disabled) === 1, 'The Text Editor select is disabled.'); $this->assertTrue(count($options) === 1, 'The Text Editor select has only one option.'); @@ -72,9 +72,9 @@ function testWithoutEditorAvailable() { $this->drupalGet('admin/config/content/formats/filtered_html'); // Verify the