function EditorPluginInterface::getJSSettings

Returns JavaScript settings to be attached.

Most text editors use JavaScript to provide a WYSIWYG or toolbar on the client-side interface. This method can be used to convert internal settings of the text editor into JavaScript variables that will be accessible when the text editor is loaded.

Parameters

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

Return value

array An array of settings that will be added to the page for use by this text editor's JavaScript integration.

See also

drupal_process_attached()

EditorManager::getAttachments()

2 methods override EditorPluginInterface::getJSSettings()
CKEditor::getJSSettings in drupal/core/modules/ckeditor/lib/Drupal/ckeditor/Plugin/Editor/CKEditor.php
Implements \Drupal\editor\Plugin\EditPluginInterface::getJSSettings().
UnicornEditor::getJSSettings in drupal/core/modules/editor/tests/modules/lib/Drupal/editor_test/Plugin/Editor/UnicornEditor.php
Implements \Drupal\editor\Plugin\EditPluginInterface::getJSSettings().

File

drupal/core/modules/editor/lib/Drupal/editor/Plugin/EditorPluginInterface.php, line 96
Contains \Drupal\editor\Plugin\EditPluginInterface.

Class

EditorPluginInterface
Defines an interface for configurable text editors.

Namespace

Drupal\editor\Plugin

Code

function getJSSettings(Editor $editor);