3 if (!defined('_ECRIRE_INC_VERSION')) {
7 function typoenluminee_porte_plume_barre_pre_charger($barres) {
8 $barre = &$barres['edition'];
10 $barre->cacher('italic');
11 $barre->cacher('stroke_through');
12 $barre->cacher('notes');
13 $barre->cacher('sepCode');
14 $barre->cacher('grpCode');
16 $module_barre = 'barre_outils';
17 if (intval($GLOBALS['spip_version_branche']) > 2) {
18 $module_barre = 'barreoutils';
21 $barre->set('header1', array(
22 // groupe formatage paragraphe
26 'name' => _T('barre_intertitre'),
27 'className' => 'outil_intertitre1',
28 'openWith' => "\n{{{",
29 'closeWith' => "}}}\n",
31 'selectionType' => 'line',
34 'id' => 'intertitre2',
35 'name' => _T('enlumtypo:barre_intertitre2'),
36 'className' => 'outil_intertitre2',
37 'openWith' => "\n{{{**",
38 'closeWith' => "}}}\n",
40 'selectionType' => 'line',
43 'id' => 'intertitre3',
44 'name' => _T('enlumtypo:barre_intertitre3'),
45 'className' => 'outil_intertitre3',
46 'openWith' => "\n{{{***",
47 'closeWith' => "}}}\n",
49 'selectionType' => 'line',
52 'id' => 'alignerdroite',
53 'name' => _T('enlumtypo:barre_alignerdroite'),
54 'className' => 'outil_alignerdroite',
56 'closeWith' => "/]\n",
58 'selectionType' => 'line',
61 'id' => 'alignergauche',
62 'name' => _T('enlumtypo:barre_alignergauche'),
63 'className' => 'outil_alignergauche',
65 'closeWith' => "!]\n",
67 'lang' => array('ar', 'fa'),
68 'selectionType' => 'line',
72 'name' => _T('enlumtypo:barre_encadrer'),
73 'className' => 'outil_cadretexte',
75 'closeWith' => ")]\n",
77 'selectionType' => 'line',
80 'id' => 'barre_cadre',
81 'name' => _T($module_barre . ':barre_cadre'),
82 'className' => 'outil_barre_cadre',
83 'openWith' => "\n<cadre>",
84 'closeWith' => "</cadre>\n",
86 'selectionType' => 'line',
91 $barre->set('bold', array(
92 // groupe formatage texte
97 'name' => _T('barreoutils:barre_italic'),
99 'className' => 'outil_italic',
100 'replaceWith' => "function(h){ return espace_si_accolade(h, '{', '}');}",
102 //'closeWith' => '}',
104 'selectionType' => 'word',
108 'id' => 'petitescapitales',
109 'name' => _T('enlumtypo:barre_petitescapitales'),
110 'className' => 'outil_petitescapitales',
111 'openWith' => '<sc>',
112 'closeWith' => '</sc>',
114 'selectionType' => 'word',
116 // montrer une suppression
118 'id' => 'stroke_through_et',
119 'name' => _T('enlumtypo:barre_barre'), // :-)
120 'className' => 'outil_stroke_through_et',
121 'openWith' => '<del>',
122 'closeWith' => '</del>',
124 'selectionType' => 'word',
126 // Mise en évidence (gras + couleur)
128 'id' => 'miseenevidence',
129 'name' => _T('enlumtypo:barre_miseenevidence'),
130 'className' => 'outil_miseenevidence',
134 'selectionType' => 'word',
136 // Mise en évidence2 (gras + autre couleur)
138 'id' => 'miseenevidence2',
139 'name' => _T('enlumtypo:barre_miseenevidence2'),
140 'className' => 'outil_miseenevidence2',
144 'selectionType' => 'word',
149 'name' => _T('enlumtypo:barre_exposant'),
150 'className' => 'outil_exposant',
151 'openWith' => '<sup>',
152 'closeWith' => '</sup>',
154 'selectionType' => 'word',
159 'name' => _T('enlumtypo:barre_indice'),
160 'className' => 'outil_indice',
161 'openWith' => '<sub>',
162 'closeWith' => '</sub>',
164 'selectionType' => 'word',
168 'id' => 'barre_code',
169 'name' => _T($module_barre . ':barre_code'),
170 'className' => 'outil_barre_code',
171 'openWith' => '<code>',
172 'closeWith' => '</code>',
174 'selectionType' => 'word',
179 $barre->set('link', array(
180 // groupe formatage texte
184 'name' => _T('barreoutils:barre_note'),
185 'className' => 'outil_notes',
189 'selectionType' => 'word',
195 $barre->ajouterApres('notes', array(
196 'id' => 'barre_tableau',
197 'name' => _T('enlumtypo:barre_tableau'),
198 'className' => 'outil_barre_tableau',
199 'replaceWith' => 'function(markitup) { zone_selection = markitup.textarea; window.open("?exec=tableau_edit", "","scrollbars=yes,resizable=yes,width=700,height=600") }',
201 'selectionType' => 'line',
204 $barre->set('quote', array(
205 'openWith' => '<quote>',
206 'closeWith' => '</quote>',
209 $barre->set('quote', array(
213 'id' => 'barre_poesie',
214 'name' => _T($module_barre . ':barre_poesie'),
215 'className' => 'outil_barre_poesie',
216 'openWith' => "\n<poesie>\n",
217 'closeWith' => "\n</poesie>\n",
219 'selectionType' => 'word',
227 function typoenluminee_porte_plume_lien_classe_vers_icone($flux) {
228 return array_merge($flux, array(
229 'outil_intertitre1' => array('spt-v1.png', '-10px -226px'), //'intertitre.png'
230 'outil_intertitre2' => array('intertitre2.png', '0'),
231 'outil_intertitre3' => array('intertitre3.png', '0'),
232 'outil_alignerdroite' => array('right.png', '0'),
233 'outil_alignergauche' => array('left.png', '0'),
234 'outil_stroke_through_et' => array('spt-v1.png', '-10px -946px'), //'text_strikethrough.png'
235 'outil_cadretexte' => array('cadretexte.png', '0'),
236 'outil_speciaux' => array('tag.png', '0'),
237 'outil_barre_code' => array('page_white_code_red.png', '0'),
238 'outil_barre_cadre' => array('page_white_code.png', '0'),
240 'outil_miseenevidence' => array('miseenevidence.png', '0'),
241 'outil_miseenevidence2' => array('miseenevidence2.png', '0'),
242 'outil_exposant' => array('exposant.png', '0'),
243 'outil_indice' => array('indice.png', '0'),
244 'outil_petitescapitales' => array('petitescapitales.png', '0'),
245 'outil_barre_poesie' => array('poesie.png', '0'),
247 'outil_barre_tableau' => array('barre-tableau.png', '0'),