1
|
<?php
|
2
|
|
3
|
/**
|
4
|
* @file
|
5
|
* Provides WYSIWYG integration for CKEditor.
|
6
|
*/
|
7
|
|
8
|
/**
|
9
|
* Implements hook_ckeditor_plugin().
|
10
|
*/
|
11
|
function media_wysiwyg_ckeditor_plugin() {
|
12
|
return array(
|
13
|
'media' => array(
|
14
|
'name' => 'media',
|
15
|
'desc' => t('Plugin for inserting images from Drupal media module'),
|
16
|
'path' => base_path() . drupal_get_path('module', 'media_wysiwyg') . '/wysiwyg_plugins/media_ckeditor/',
|
17
|
'buttons' => array(
|
18
|
'Media' => array(
|
19
|
'icon' => 'images/icon.gif',
|
20
|
'label' => 'Add media',
|
21
|
),
|
22
|
),
|
23
|
'default' => 'f',
|
24
|
),
|
25
|
);
|
26
|
}
|
27
|
|
28
|
/**
|
29
|
* Implements hook_ckeditor_plugin_alter().
|
30
|
*/
|
31
|
function media_wysiwyg_ckeditor_plugin_alter(&$plugins) {
|
32
|
// To ensure the ckeditor media integration is done by this module all other
|
33
|
// integrations are overwritten here. However additionally added keys will be
|
34
|
// left intact.
|
35
|
$default_plugin = media_wysiwyg_ckeditor_plugin();
|
36
|
$plugins['media'] = $default_plugin['media'] + $plugins['media'];
|
37
|
}
|