-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathckeditor_indent.module
49 lines (46 loc) · 1.42 KB
/
ckeditor_indent.module
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
/**
* @file
* Registering CKEditor plugin.
*/
/**
* Implements hook_ckeditor_plugins().
*/
function ckeditor_indent_ckeditor_plugins() {
$path = backdrop_get_path('module', 'ckeditor_indent') . '/plugins';
$plugins['indent'] = array(
'file' => 'plugin.js',
'path' => $path . '/indent',
'css' => array(backdrop_get_path('module', 'ckeditor_indent') . '/css/ckeditor-indent.css'),
'enabled callback' => 'ckeditor_indent_plugin_check',
'buttons' => array(
'Indent' => array(
'label' => 'Indent',
'image' => $path . '/indent/icons/indent.png',
),
'Outdent' => array(
'label' => 'Outdent',
'image' => $path . '/indent/icons/outdent.png',
),
),
);
$plugins['indentblock'] = array(
'file' => 'plugin.js',
'path' => $path . '/indentblock',
'enabled callback' => 'ckeditor_indent_plugin_check',
);
$plugins['indentlist'] = array(
'file' => 'plugin.js',
'path' => $path . '/indentlist',
'enabled callback' => 'ckeditor_indent_plugin_check',
);
return $plugins;
}
function ckeditor_indent_plugin_check($format, $plugin_name) {
return TRUE;
}
function ckeditor_indent_ckeditor_settings_alter(&$settings, $format) {
$settings['indentClasses'] = array('indent1', 'indent2', 'indent3', 'indent4', 'indent5', 'indent6', 'indent7', 'indent8', 'indent9', 'indent10');
$settings['indentOffset'] = 20;
$settings['indentUnit'] = 'px';
}