public function UEditor::getLibraries in UEditor - 百度编辑器 8
Returns libraries to be attached.
Because this is a method, plugins can dynamically choose to attach a different library for different configurations, instead of being forced to always use the same method.
Parameters
\Drupal\editor\Entity\Editor $editor: A configured text editor object.
Return value
array An array of libraries that will be added to the page for use by this text editor.
Overrides EditorPluginInterface::getLibraries
See also
\Drupal\Core\Render\AttachmentsResponseProcessorInterface::processAttachments()
EditorManager::getAttachments()
File
- src/
Plugin/ Editor/ UEditor.php, line 371
Class
- UEditor
- Defines a UEditor-based text editor for Drupal.
Namespace
Drupal\ueditor\Plugin\EditorCode
public function getLibraries(Editor $editor) {
$libraries = array(
'ueditor/drupal.ueditor',
);
if (isset($this->global_settings['ueditor_enable_formula_editor']) && $this->global_settings['ueditor_enable_formula_editor']) {
array_push($libraries, 'ueditor/ueditor.formula');
}
return $libraries;
}