public function EditorPluginInterface::getJSSettings in Drupal 8
Same name and namespace in other branches
- 9 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()
4 methods override EditorPluginInterface::getJSSettings()
- BcEditor::getJSSettings in core/
modules/ editor/ tests/ src/ Unit/ EditorBaseTest.php - Returns JavaScript settings to be attached.
- 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);