Implements hook_library_info().
function editor_library_info() {
$path = drupal_get_path('module', 'editor');
$libraries['drupal.editor'] = array(
'title' => 'Text Editor',
'version' => VERSION,
'js' => array(
$path . '/js/editor.js' => array(),
),
'dependencies' => array(
array(
'system',
'jquery',
),
array(
'system',
'drupal',
),
array(
'system',
'drupalSettings',
),
array(
'system',
'jquery.once',
),
),
);
$libraries['edit.formattedTextEditor.editor'] = array(
'title' => 'Formatted text editor',
'version' => VERSION,
'js' => array(
$path . '/js/editor.formattedTextEditor.js' => array(
'scope' => 'footer',
'attributes' => array(
'defer' => TRUE,
),
),
array(
'type' => 'setting',
'data' => array(
'editor' => array(
'getUntransformedTextURL' => url('editor/!entity_type/!id/!field_name/!langcode/!view_mode'),
),
),
),
),
'dependencies' => array(
array(
'edit',
'edit',
),
array(
'editor',
'drupal.editor',
),
array(
'system',
'drupal.ajax',
),
array(
'system',
'drupalSettings',
),
),
);
return $libraries;
}