You are here

function ckeditor_library_info in CKEditor for WYSIWYG Module 8

Implements hook_library_info().

File

./ckeditor.module, line 13
Provides integration with the CKEditor WYSIWYG editor.

Code

function ckeditor_library_info() {
  $module_path = drupal_get_path('module', 'ckeditor');
  $settings = array(
    'ckeditor' => array(
      'modulePath' => drupal_get_path('module', 'ckeditor'),
    ),
  );
  $libraries['drupal.ckeditor'] = array(
    'title' => 'Drupal behavior to enable CKEditor on textareas.',
    'version' => VERSION,
    'js' => array(
      $module_path . '/js/ckeditor.js' => array(),
      array(
        'data' => $settings,
        'type' => 'setting',
      ),
    ),
    'dependencies' => array(
      array(
        'editor',
        'drupal.editor',
      ),
      array(
        'ckeditor',
        'ckeditor',
      ),
    ),
  );
  $libraries['drupal.ckeditor.css'] = array(
    'title' => 'Formatting CSS for common classes used in CKEditor.',
    'version' => VERSION,
    'css' => array(
      $module_path . '/css/ckeditor.css' => array(),
    ),
  );
  $libraries['drupal.ckeditor.admin'] = array(
    'title' => 'Drupal behavior to enable CKEditor on textareas.',
    'version' => VERSION,
    'js' => array(
      $module_path . '/js/ckeditor.admin.js' => array(),
    ),
    'css' => array(
      $module_path . '/css/ckeditor.admin.css' => array(),
    ),
    'dependencies' => array(
      array(
        'system',
        'jquery.once',
      ),
      array(
        'system',
        'jquery.ui.sortable',
      ),
      array(
        'system',
        'jquery.ui.draggable',
      ),
    ),
  );
  $libraries['ckeditor'] = array(
    'title' => 'Loads the main CKEditor library.',
    'version' => CKEDITOR_VERSION,
    'js' => array(
      $module_path . '/lib/ckeditor/ckeditor.js' => array(),
    ),
  );
  return $libraries;
}