function CKEditorPluginInterface::getConfig

Same name in other branches
  1. 9 core/modules/ckeditor/src/CKEditorPluginInterface.php \Drupal\ckeditor\CKEditorPluginInterface::getConfig()

Returns the additions to CKEDITOR.config for a specific CKEditor instance.

The editor's settings can be retrieved via $editor->getSettings(), but be aware that it may not yet contain plugin-specific settings, because the user may not yet have configured the form. If there are plugin-specific settings (verify with isset()), they can be found at

$settings = $editor->getSettings();
$plugin_specific_settings = $settings['plugins'][$plugin_id];

Parameters

\Drupal\editor\Entity\Editor $editor: A configured text editor object.

Return value

array A keyed array, whose keys will end up as keys under CKEDITOR.config.

9 methods override CKEditorPluginInterface::getConfig()
DrupalImage::getConfig in core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalImage.php
Returns the additions to CKEDITOR.config for a specific CKEditor instance.
DrupalImageCaption::getConfig in core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalImageCaption.php
Returns the additions to CKEDITOR.config for a specific CKEditor instance.
DrupalLink::getConfig in core/modules/ckeditor/src/Plugin/CKEditorPlugin/DrupalLink.php
Returns the additions to CKEDITOR.config for a specific CKEditor instance.
DrupalMedia::getConfig in core/modules/media/src/Plugin/CKEditorPlugin/DrupalMedia.php
Returns the additions to CKEDITOR.config for a specific CKEditor instance.
DrupalMediaLibrary::getConfig in core/modules/media_library/src/Plugin/CKEditorPlugin/DrupalMediaLibrary.php
Returns the additions to CKEDITOR.config for a specific CKEditor instance.

... See full list

File

core/modules/ckeditor/src/CKEditorPluginInterface.php, line 100

Class

CKEditorPluginInterface
Defines an interface for (loading of) CKEditor plugins.

Namespace

Drupal\ckeditor

Code

public function getConfig(Editor $editor);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.