diff --git a/core/modules/ckeditor/src/Tests/CKEditorLoadingTest.php b/core/modules/ckeditor/src/Tests/CKEditorLoadingTest.php index 2f3ae8b..4dda8a0 100644 --- a/core/modules/ckeditor/src/Tests/CKEditorLoadingTest.php +++ b/core/modules/ckeditor/src/Tests/CKEditorLoadingTest.php @@ -107,7 +107,7 @@ function testLoading() { $expected = array('formats' => array('filtered_html' => array( 'format' => 'filtered_html', 'editor' => 'ckeditor', - 'editorSettings' => $ckeditor_plugin->getDefaultConfiguration($editor), + 'editorSettings' => $ckeditor_plugin->getJSConfiguration($editor), 'editorSupportsContentFiltering' => TRUE, 'isXssSafe' => FALSE, ))); @@ -138,7 +138,7 @@ function testLoading() { 'filtered_html' => array( 'format' => 'filtered_html', 'editor' => 'ckeditor', - 'editorSettings' => $ckeditor_plugin->getDefaultConfiguration($editor), + 'editorSettings' => $ckeditor_plugin->getJSConfiguration($editor), 'editorSupportsContentFiltering' => TRUE, 'isXssSafe' => FALSE, ))); diff --git a/core/modules/editor/editor.module b/core/modules/editor/editor.module index 85cd1f3..19a5332 100644 --- a/core/modules/editor/editor.module +++ b/core/modules/editor/editor.module @@ -152,7 +152,7 @@ function editor_form_filter_format_form_alter(&$form, FormStateInterface $form_s // Add editor-specific validation and submit handlers. if ($editor) { - /** @var $plugin \Drupal\editor\Plugin\EditorPluginInterface */ + /** @var $plugin \Drupal\editor\Plugin\EditorPluginInterface */ $plugin = $manager->createInstance($editor->getEditor()); $settings_form = array(); $settings_form['#element_validate'][] = array($plugin, 'validateConfigurationForm'); diff --git a/core/modules/editor/src/Entity/Editor.php b/core/modules/editor/src/Entity/Editor.php index 82902aa..5f56d6b 100644 --- a/core/modules/editor/src/Entity/Editor.php +++ b/core/modules/editor/src/Entity/Editor.php @@ -80,7 +80,8 @@ public function __construct(array $values, $entity_type) { parent::__construct($values, $entity_type); $plugin = $this->editorPluginManager()->createInstance($this->editor); - /* @var EditorPluginInterface $plugin */ + + /* @var EditorPluginInterface $plugin */ $this->settings += $plugin->getDefaultConfiguration(); } diff --git a/core/modules/editor/src/Plugin/EditorManager.php b/core/modules/editor/src/Plugin/EditorManager.php index 6fc04d0..286fb39 100644 --- a/core/modules/editor/src/Plugin/EditorManager.php +++ b/core/modules/editor/src/Plugin/EditorManager.php @@ -83,7 +83,7 @@ public function getAttachments(array $format_ids) { $settings['editor']['formats'][$format_id] = array( 'format' => $format_id, 'editor' => $editor->getEditor(), - 'editorSettings' => $plugin->getJSSettings($editor), + 'editorSettings' => $plugin->getJSConfiguration($editor), 'editorSupportsContentFiltering' => $plugin_definition['supports_content_filtering'], 'isXssSafe' => $plugin_definition['is_xss_safe'], ); diff --git a/core/modules/editor/src/Plugin/EditorPluginInterface.php b/core/modules/editor/src/Plugin/EditorPluginInterface.php index d08575e..430c7ab 100644 --- a/core/modules/editor/src/Plugin/EditorPluginInterface.php +++ b/core/modules/editor/src/Plugin/EditorPluginInterface.php @@ -32,7 +32,8 @@ * An array of settings as they would be stored by a configured text editor * entity (\Drupal\editor\Entity\Editor). */ - public function getDefaultConfiguration(); + public function getDefaultConfiguration(); + /** * Validates the settings form for an editor. * @@ -98,30 +99,14 @@ public function getJSConfiguration(Editor $editor); * @see EditorManager::getAttachments() */ public function getLibraries(Editor $editor); - /** - * {@inheritdoc} - * - * If the editor's behavior depends on extensive options and/or external data, - * then the implementing module can choose to provide a separate, global - * configuration page rather than per-text-format configuration. In that case, - * this form should provide a link to the separate configuration page. - */ - public function buildConfigurationForm(array $form, FormStateInterface $form_state); - - /** - * {@inheritdoc} - * - * The contents of the editor configuration are located in - * $form_state->getValue(array('editor', 'settings')). Calls to form_error() - * should reflect this location in the settings form. - */ - // public function validateConfigurationForm(array &$form, FormStateInterface $form_state); - /** - * {@inheritdoc} - * - * Values in $form_state->getValue(array('editor', 'settings')) are saved by - * Editor module in editor_form_filter_admin_format_submit(). - */ - // public function submitConfigurationForm(array &$form, FormStateInterface $form_state); + /** + * {@inheritdoc} + * + * If the editor's behavior depends on extensive options and/or external data, + * then the implementing module can choose to provide a separate, global + * configuration page rather than per-text-format configuration. In that case, + * this form should provide a link to the separate configuration page. + */ + public function buildConfigurationForm(array $form, FormStateInterface $form_state); }