public function CKEditorPluginManager::getCssFiles in Drupal 9
Same name and namespace in other branches
- 8 core/modules/ckeditor/src/CKEditorPluginManager.php \Drupal\ckeditor\CKEditorPluginManager::getCssFiles()
Retrieves enabled plugins' iframe instance CSS files, keyed by plugin ID.
Parameters
\Drupal\editor\Entity\Editor $editor: A configured text editor object.
Return value
string[] Enabled plugins CKEditor CSS files, with plugin IDs as keys and CSS file paths relative to the Drupal root (as implemented by getCssFiles()) as values.
See also
\Drupal\ckeditor\CKEditorPluginCssInterface::getCssFiles()
File
- core/
modules/ ckeditor/ src/ CKEditorPluginManager.php, line 208
Class
- CKEditorPluginManager
- Provides a CKEditor Plugin plugin manager.
Namespace
Drupal\ckeditorCode
public function getCssFiles(Editor $editor) {
$enabled_plugins = array_keys($this
->getEnabledPluginFiles($editor, TRUE));
$css_files = [];
foreach ($enabled_plugins as $plugin_id) {
$plugin = $this
->createInstance($plugin_id);
if ($plugin instanceof CKEditorPluginCssInterface) {
$css_files[$plugin_id] = $plugin
->getCssFiles($editor);
}
}
return $css_files;
}