You are here

function hook_quickedit_editor_attachments_alter in Quick Edit 7

Alter the list of attached files for the editor depending on the fields conf.

Parameters

$attachments: #attached array returned by the editor attachments callback.

$editor_id: ID of the currently used editor.

1 invocation of hook_quickedit_editor_attachments_alter()
QuickEditEditorSelector::getEditorAttachments in includes/QuickEditEditorSelector.php
Implements QuickEditEditorSelectorInterface::getEditorAttachments().

File

./quickedit.api.php, line 102
Hooks provided by the Quick Edit module.

Code

function hook_quickedit_editor_attachments_alter(&$attachments, $editor_id) {
  if ($editor_id === 'ckeditor') {
    $attachments['library'][] = array(
      'mymodule',
      'myjslibrary',
    );
  }
}