public function EditorPluginInterface::getJSSettings in Drupal 9
Same name and namespace in other branches
- 8 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()
- CKEditor::getJSSettings in core/
modules/ ckeditor/ src/ Plugin/ Editor/ CKEditor.php - Returns JavaScript settings to be attached.
- TRexEditor::getJSSettings in core/
modules/ editor/ tests/ modules/ src/ Plugin/ Editor/ TRexEditor.php - Returns JavaScript settings to be attached.
- UnicornEditor::getJSSettings in core/
modules/ editor/ tests/ modules/ src/ Plugin/ Editor/ UnicornEditor.php - Returns JavaScript settings to be attached.
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);