function EditorPluginInterface::getJSSettings
Same name in other branches
- 9 core/modules/editor/src/Plugin/EditorPluginInterface.php \Drupal\editor\Plugin\EditorPluginInterface::getJSSettings()
- 8.9.x core/modules/editor/src/Plugin/EditorPluginInterface.php \Drupal\editor\Plugin\EditorPluginInterface::getJSSettings()
- 10 core/modules/editor/src/Plugin/EditorPluginInterface.php \Drupal\editor\Plugin\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\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\Core\Render\AttachmentsResponseProcessorInterface::processAttachments()
EditorManager::getAttachments()
3 methods override EditorPluginInterface::getJSSettings()
- CKEditor5::getJSSettings in core/
modules/ ckeditor5/ src/ Plugin/ Editor/ CKEditor5.php - TRexEditor::getJSSettings in core/
modules/ editor/ tests/ modules/ editor_test/ src/ Plugin/ Editor/ TRexEditor.php - UnicornEditor::getJSSettings in core/
modules/ editor/ tests/ modules/ editor_test/ src/ Plugin/ Editor/ UnicornEditor.php
File
-
core/
modules/ editor/ src/ Plugin/ EditorPluginInterface.php, line 54
Class
- EditorPluginInterface
- Defines an interface for configurable text editors.
Namespace
Drupal\editor\PluginCode
public function getJSSettings(Editor $editor);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.