Rev 14241 | Rev 15568 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 14241 | Rev 15017 | ||
---|---|---|---|
Line 132... | Line 132... | ||
132 | /* insert just after editor */\ |
132 | /* insert just after editor */\ |
133 | ed.parentNode.insertBefore(div, ed.nextSibling);\ |
133 | ed.parentNode.insertBefore(div, ed.nextSibling);\ |
134 | }\ |
134 | }\ |
135 | });\ |
135 | });\ |
136 | /* Initialize editors */\ |
136 | /* Initialize editors */\ |
- | 137 | // RegExp du texte a chercher\ |
|
- | 138 | var find1 = '\\\\imagedir\/';\ |
|
- | 139 | var re1 = new RegExp(find1, 'g');\ |
|
- | 140 | // texte de remplacement\ |
|
- | 141 | var replace1 = '\\imagedir\/';\ |
|
- | 142 | var replace2 = '$wims_ref_name?cmd=getfile&session=$wims_session&special_parm=oefimg/';\ |
|
- | 143 | // convertit l'url de remplacement en RegExp\ |
|
- | 144 | var find2 = replace2.replace(/\//g, '\\/');\ |
|
- | 145 | var find2 = find2.replace(/\./g, '\\.');\ |
|
- | 146 | var find2 = find2.replace(/\?/g, '\\?');\ |
|
- | 147 | var re2 = new RegExp(find2, 'g');\ |
|
137 | tinymce.init({\ |
148 | tinymce.init({\ |
138 | selector:'$wims_read_parm',\ |
149 | selector:'$wims_read_parm',\ |
139 | plugins: '$iEdit_plugins',\ |
150 | plugins: '$iEdit_plugins',\ |
140 | block_formats : tinymce.translate('Paragraph')+'=p;' +tinymce.translate('Heading 1')+'=h2;'+tinymce.translate('Heading 2')+'=h3;' +tinymce.translate('Heading 3')+'=h4;' +tinymce.translate('Heading 4')+'=h5;' +tinymce.translate('Heading 5')+'=h6;' +tinymce.translate('Preformatted')+'=pre;' +tinymce.translate('Blockquote')+'=blockquote;',\ |
151 | block_formats : tinymce.translate('Paragraph')+'=p;' +tinymce.translate('Heading 1')+'=h2;'+tinymce.translate('Heading 2')+'=h3;' +tinymce.translate('Heading 3')+'=h4;' +tinymce.translate('Heading 4')+'=h5;' +tinymce.translate('Heading 5')+'=h6;' +tinymce.translate('Preformatted')+'=pre;' +tinymce.translate('Blockquote')+'=blockquote;',\ |
141 | menubar: false,\ |
152 | menubar: false,\ |
Line 149... | Line 160... | ||
149 | body_class: 'main_body',\ |
160 | body_class: 'main_body',\ |
150 | content_style : ':root{--wims_bgcolor: $wims_bgcolor;--wims_link_color: $wims_link_color;--wims_vlink_color: $wims_vlink_color;--wims_hlink_color: $wims_hlink_color;--wims_ref_menucolor: $wims_ref_menucolor;--wims_ref_bgcolor: $wims_ref_bgcolor;--wims_ref_button_color: $wims_ref_button_color;--wims_ref_button_bgcolor: $wims_ref_button_bgcolor;}a, .ui-widget-content a{color:$wims_link_color}a:hover, a:focus {color:$wims_hlink_color}table.wimstable th{background-color: $wims_ref_bgcolor;color: $wims_ref_menucolor}table.wimstable th a{color: $wims_ref_menucolor}.wimstable caption a{color: $wims_ref_menucolor}.wims_emph {color:$wims_ref_bgcolor}input[type="submit"],input[type="button"],.main_body .wims_button{background-color:$wims_ref_button_bgcolor;color:$wims_ref_button_color}.main_body .wims_button_help{background-color:$wims_ref_button_help_bgcolor;color:$wims_ref_button_help_color}.property_fields{border-color:$wims_ref_bgcolor}.property_fields legend{background-color: $wims_ref_bgcolor}.property_fields legend,.property_fields legend>a{color:$wims_ref_menucolor}.wims_color1 {background-color: $wims_ref_bgcolor;color:$wims_ref_menucolor}.wims_color2 {background-color:$wims_ref_button_bgcolor;color:$wims_ref_button_color}.wims_color3 {background-color:$wims_ref_button_help_bgcolor;color:$wims_ref_button_help_color}',\ |
161 | content_style : ':root{--wims_bgcolor: $wims_bgcolor;--wims_link_color: $wims_link_color;--wims_vlink_color: $wims_vlink_color;--wims_hlink_color: $wims_hlink_color;--wims_ref_menucolor: $wims_ref_menucolor;--wims_ref_bgcolor: $wims_ref_bgcolor;--wims_ref_button_color: $wims_ref_button_color;--wims_ref_button_bgcolor: $wims_ref_button_bgcolor;}a, .ui-widget-content a{color:$wims_link_color}a:hover, a:focus {color:$wims_hlink_color}table.wimstable th{background-color: $wims_ref_bgcolor;color: $wims_ref_menucolor}table.wimstable th a{color: $wims_ref_menucolor}.wimstable caption a{color: $wims_ref_menucolor}.wims_emph {color:$wims_ref_bgcolor}input[type="submit"],input[type="button"],.main_body .wims_button{background-color:$wims_ref_button_bgcolor;color:$wims_ref_button_color}.main_body .wims_button_help{background-color:$wims_ref_button_help_bgcolor;color:$wims_ref_button_help_color}.property_fields{border-color:$wims_ref_bgcolor}.property_fields legend{background-color: $wims_ref_bgcolor}.property_fields legend,.property_fields legend>a{color:$wims_ref_menucolor}.wims_color1 {background-color: $wims_ref_bgcolor;color:$wims_ref_menucolor}.wims_color2 {background-color:$wims_ref_button_bgcolor;color:$wims_ref_button_color}.wims_color3 {background-color:$wims_ref_button_help_bgcolor;color:$wims_ref_button_help_color}',\ |
151 | init_instance_callback: function(editor) {\ |
162 | init_instance_callback: function(editor) {\ |
152 | editor.on('PostProcess', function (e) {\ |
163 | editor.on('PostProcess', function (e) {\ |
153 | // Avant d'afficher le code source\ |
164 | // Avant d'afficher le code source\ |
154 | e.content = e.content.replace( |
165 | e.content = e.content.replace(re2, replace1);\ |
155 | });\ |
166 | });\ |
156 | editor.on('BeforeSetContent', function (e) {\ |
167 | editor.on('BeforeSetContent', function (e) {\ |
157 | // Lors de l'enregistrement du code source\ |
168 | // Lors de l'enregistrement du code source\ |
158 | e.content = e.content.replace( |
169 | e.content = e.content.replace(re1, replace2);\ |
159 | });\ |
170 | });\ |
160 | // refresh content, searching for 'imagedir'\ |
171 | // refresh content, searching for 'imagedir'\ |
161 | editor.setContent(editor.getContent());\ |
172 | editor.setContent(editor.getContent());\ |
162 | }\ |
173 | }\ |
163 | });\ |
174 | });\ |