You are here

function editor_library in Editor 7

Implements hook_library().

File

./editor.module, line 142
Allows rich text fields to be edited using WYSIWYG client-side editors.

Code

function editor_library() {
  $libraries['drupal.editor'] = array(
    'title' => 'Drupal Editor',
    'website' => 'http://www.drupal.org',
    'version' => VERSION,
    'js' => array(
      drupal_get_path('module', 'editor') . '/js/editor.js' => array(
        'weight' => 2,
      ),
    ),
    'dependencies' => array(
      array(
        'system',
        'jquery',
      ),
      array(
        'dialog',
        'drupal.dialog',
      ),
    ),
  );
  $libraries['drupal.editor.dialog'] = array(
    'title' => 'Drupal Editor Dialog',
    'website' => 'http://www.drupal.org',
    'version' => VERSION,
    'js' => array(
      drupal_get_path('module', 'editor') . '/js/editor.dialog.js' => array(
        'weight' => 2,
      ),
    ),
    'dependencies' => array(
      array(
        'system',
        'jquery',
      ),
      array(
        'system',
        'drupal.ajax',
      ),
      array(
        'dialog',
        'drupal.dialog',
      ),
    ),
  );
  $libraries['quickedit.inPlaceEditor.formattedText'] = array(
    'title' => 'CKEditor formatted text in-place editor',
    'version' => VERSION,
    'js' => array(
      drupal_get_path('module', 'editor') . '/js/editor.formattedTextEditor.js' => array(
        'weight' => 3,
        'scope' => 'footer',
      ),
      array(
        'type' => 'setting',
        'data' => array(
          'quickedit' => array(
            'ckeditor' => array(
              'getUntransformedTextURL' => url('quickedit/ckeditor/!entity_type/!id/!field_name/!langcode/!view_mode'),
            ),
          ),
        ),
      ),
    ),
    'dependencies' => array(
      array(
        'quickedit',
        'quickedit',
      ),
      array(
        'editor',
        'drupal.editor',
      ),
      array(
        'system',
        'drupal.ajax',
      ),
    ),
  );
  $libraries['caption'] = array(
    'title' => 'Caption',
    'website' => 'http://www.drupal.org',
    'version' => VERSION,
    'css' => array(
      drupal_get_path('module', 'editor') . '/css/filter.caption.css' => array(),
    ),
  );
  $libraries['align'] = array(
    'title' => 'Align',
    'website' => 'http://www.drupal.org',
    'version' => VERSION,
    'css' => array(
      drupal_get_path('module', 'editor_ckeditor') . '/css/plugins/drupalimagecaption/editor_ckeditor.drupalimagecaption.css' => array(),
    ),
    'dependencies' => array(
      array(
        'editor',
        'caption',
      ),
    ),
  );
  return $libraries;
}