function editor_ckeditor_library in Editor 7
Implements hook_library().
File
- modules/
editor_ckeditor/ editor_ckeditor.module, line 77 - Adds CKEditor as a supported editor.
Code
function editor_ckeditor_library() {
$path = drupal_get_path('module', 'editor_ckeditor');
$libraries['drupal.editor_ckeditor.plugins.language'] = array(
'title' => 'Language plugin.',
'version' => VERSION,
'css' => array(
$path . '/css/plugins/language/editor_ckeditor.language.css' => array(),
),
);
$libraries['drupal.editor_ckeditor.language.admin'] = array(
'title' => 'Administrative library for configuring the language plugin.',
'version' => VERSION,
'js' => array(
$path . '/js/editor_ckeditor.language.admin.js' => array(),
),
'dependencies' => array(
array(
'system',
'drupal.vertical-tabs',
),
),
);
$libraries['drupal.editor_ckeditor.admin'] = array(
'title' => 'Administrative library for configuring CKEditor.',
'version' => VERSION,
'js' => array(
$path . '/js/editor_ckeditor.admin.js' => array(),
),
'css' => array(
$path . '/css/editor_ckeditor.admin.css' => array(),
),
'dependencies' => array(
array(
'system',
'ui.sortable',
),
array(
'system',
'ui.draggable',
),
),
);
$libraries['drupal.ckeditor'] = array(
'title' => 'Drupal behavior to enable CKEditor on textareas.',
'version' => VERSION,
'js' => array(
$path . '/js/ckeditor.js' => array(
// Core libraries cannot depend on contrib libraries, so we give the
// CKEditor initialization JS a low weight to ensure it comes after the
// CKEditor library itself.
'weight' => 2,
),
),
'css' => array(
$path . '/css/ckeditor.css' => array(),
),
'dependencies' => array(
array(
'filter',
'filter',
),
array(
'system',
'drupal.ajax',
),
array(
'editor_ckeditor',
'ckeditor',
),
array(
'editor',
'drupal.editor',
),
array(
'editor',
'drupal.editor.dialog',
),
),
);
$libraries['ckeditor'] = array(
'title' => 'Loads the main CKEditor library.',
'version' => CKEDITOR_VERSION,
'js' => array(
// CKEditor is both a large library and needs to be able to identify its
// installation path, so we disable aggregation on it.
$path . '/lib/ckeditor/ckeditor.js' => array(
'preprocess' => FALSE,
'group' => JS_LIBRARY,
),
),
);
return $libraries;
}