-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
_config.php
executable file
·244 lines (216 loc) · 5.14 KB
/
_config.php
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
<?php
// Example TinyMCE configuration
// Copy the code below to your mysite/_config.php file and customise as necessary to match your styles
/*
$formats = array(
// Define the styles that will be available in TinyMCE's dropdown style menu
// * Use 'selector' to specify which elements a style can be applied to
// * See Headings example below for explanation of different settings
// * Using 'classes' allows a class to be combined with others while 'attributes'=>'style' removes other classes before applying
// Headings
array(
'title' => 'Headings' // Set a title to be displayed above the following options in the dropdown menu
),
array(
// Applied to the current heading element (inline not allowed)
'title' => 'Ruled', // Title used in TinyMCE dropdown menu
'attributes' => array('class'=>'ruled'), // CSS class of .ruled will be applied to element, other classes on this element will be removed
'selector' => 'h1,h2,h3,h4,h5,h6' // Only allow class to be applied to these elements
),
array(
// Applied to selected text using a span tag, or applied to an inline element if no text is highlighted (inline allowed)
'title' => 'Sub title',
'classes' => 'sub-title', // CSS class of .sub-title will be toggled on or off, will not remove or affect other classes on this element
'inline' => 'span', // Allow applying this style inline to selected text by using a span tag
'selector' => 'i,em,b,strong,a' // If no text is selected but cursor is within one of these elements, apply class to element
),
// Paragraphs
array(
'title' => 'Paragraphs'
),
array(
'title' => 'Intro',
'attributes' => array('class'=>'intro'),
'selector' => 'p'
),
array(
'title' => 'Attention',
'attributes' => array('class'=>'msg-attention'),
'selector' => 'p'
),
array(
'title' => 'Note',
'attributes' => array('class'=>'msg-note'),
'selector' => 'p'
),
//Layout
array(
'title' => 'Layout'
),
array(
// Wrap selected content in a div with class of .split-3
'title' => '3 Column (auto-flow)',
'attributes' => array('class'=>'split-3'),
'block' => 'div',
'wrapper' => 1
),
// Text styles
array(
'title' => 'Selected text'
),
array(
'title' => 'Small',
'classes' => 'small',
'inline' => 'span',
'selector' => 'i,em,b,strong,a'
),
array(
'title' => 'Grey',
'classes' => 'text-grey',
'inline' => 'span',
'selector' => 'i,em,b,strong,a'
),
// Lists
array(
'title' => 'Lists'
),
array(
'title' => '1. 2. 3.',
'attributes' => array('class'=>'decimal'),
'selector' => 'ol'
),
array(
'title' => 'i. ii. iii.',
'attributes' => array('class'=>'roman'),
'selector' => 'ol'
),
array(
'title' => 'a. b. c.',
'attributes' => array('class'=>'alpha'),
'selector' => 'ol'
),
// Links
array(
'title' => 'Links'
),
array(
'title' => 'Arrow',
'attributes' => array('class'=>'arrow'),
'selector' => 'a'
),
array(
'title' => 'Button',
'attributes' => array('class'=>'button'),
'selector' => 'a'
),
// Tables
array(
'title' => 'Tables'
),
array(
'title' => 'Condensed',
'classes' => 'table-condensed',
'selector' => 'table'
),
array(
'title' => 'Striped',
'classes' => 'table-striped',
'selector' => 'table'
),
array(
'title' => 'Bordered',
'classes' => 'table-bordered',
'selector' => 'table'
),
array(
'title' => 'Hover effect on rows',
'classes' => 'table-hover',
'selector' => 'table'
),
// Labels
array(
'title' => 'Labels'
),
array(
'title' => 'Label: green',
'classes' => 'label-green',
'inline' => 'span',
'selector' => 'i,em,b,strong,a'
),
array(
'title' => 'Label: red',
'classes' => 'label-red',
'inline' => 'span',
'selector' => 'i,em,b,strong,a'
),
array(
'title' => 'Label: orange',
'classes' => 'label-orange',
'inline' => 'span',
'selector' => 'i,em,b,strong,a'
),
array(
'title' => 'Label: blue',
'classes' => 'label-blue',
'inline' => 'span',
'selector' => 'i,em,b,strong,a'
),
// Images
array(
'title' => 'Images',
),
array(
'title' => 'Align right with text wrap',
'attributes' => array('class'=>'right'),
'selector' => 'img,div'
),
array(
'title' => 'Align left with text wrap',
'attributes' => array('class'=>'left'),
'selector' => 'img,div'
),
array(
'title' => 'Align center - no text wrap',
'attributes' => array('class'=>'center'),
'selector' => 'img,div'
)
);
//Set the dropdown menu options
HtmlEditorConfig::get('cms')->setOption('style_formats',$formats);
// Reconstruct editor toolbar with less buttons
HtmlEditorConfig::get('cms')->setButtonsForLine(1,
'pastetext',
'bold',
'italic',
'styleselect',
'formatselect',
'bullist',
'numlist',
'outdent',
'blockquote',
'indent',
'code',
'fullscreen'
);
HtmlEditorConfig::get('cms')->setButtonsForLine(2,
'image',
'link',
'unlink',
'anchor',
'hr',
'table',
'row_props',
'cell_props',
'row_before',
'row_after',
'delete_row',
'col_before',
'col_after',
'delete_col',
'split_cells',
'merge_cells'
);
HtmlEditorConfig::get('cms')->setButtonsForLine(3,''); // Delete line 3
// Remove h1 tag option
HtmlEditorConfig::get('cms')->setOption('theme_advanced_blockformats', 'p,address,pre,h2,h3,h4,h5,h6');
*/