function editor_load in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/editor/editor.module \editor_load()
Loads an individual configured text editor based on text format ID.
Return value
\Drupal\editor\Entity\Editor|null A text editor object, or NULL.
9 calls to editor_load()
- Editor::getAttachments in core/
modules/ editor/ src/ Plugin/ InPlaceEditor/ Editor.php - Returns the attachments for this editor.
- Editor::isCompatible in core/
modules/ editor/ src/ Plugin/ InPlaceEditor/ Editor.php - Checks whether this in-place editor is compatible with a given field.
- EditorAdminTest::verifyUnicornEditorConfiguration in core/
modules/ editor/ src/ Tests/ EditorAdminTest.php - Verifies unicorn editor configuration.
- EditorImageDialog::buildForm in core/
modules/ editor/ src/ Form/ EditorImageDialog.php - EditorManager::getAttachments in core/
modules/ editor/ src/ Plugin/ EditorManager.php - Retrieves text editor libraries and JavaScript settings.
File
- core/
modules/ editor/ editor.module, line 244 - Adds bindings for client-side "text editors" to text formats.
Code
function editor_load($format_id) {
// Load all the editors at once here, assuming that either no editors or more
// than one editor will be needed on a page (such as having multiple text
// formats for administrators). Loading a small number of editors all at once
// is more efficient than loading multiple editors individually.
$editors = entity_load_multiple('editor');
return isset($editors[$format_id]) ? $editors[$format_id] : NULL;
}