Autre approche pour la surcharge : on surcharge « catalog_object », une méthode plus...
[Plinn.git] / skins / ajax_scripts / fck_inline_script.dtml
1 <script type="text/javascript">
2 //<!--
3 __FCKeditorNS = null;
4 function initFCK(config) {
5 var oFCKeditor = new FCKeditor( config['fckId'], config['Width'], config['Height'] );
6 oFCKeditor.BasePath = config['BasePath'];
7 oFCKeditor.Config['CustomConfigurationsPath'] = config['CustomConfigurationsPath'];
8 oFCKeditor.Config['SkinPath'] = config['BasePath'] + 'editor/skins/silver/';
9 oFCKeditor.Config['contentPath'] = config['contentPath'];
10 oFCKeditor.ReplaceTextarea() ;
11
12 var fckForm = document.getElementById(config['fckId']).form;
13 if ((AJAX_CONFIG & 2) == 2) {
14 var formManager = new FormManager(fckForm, document.getElementById('mainCell'));
15 formManager.onBeforeSubmit = function(manager) {
16 var FCK = document.getElementById(config['fckId'] + '___Frame').contentWindow.FCK;
17 FCK.UpdateLinkedField();
18 };
19 }
20 }
21
22 initFCK(
23 {'BasePath': '&dtml-BasePath;',
24 'CustomConfigurationsPath' : '&dtml-CustomConfigurationsPath;',
25 'Width':'100%',
26 'Height':'500px',
27 'fckId': '&dtml-fckId;',
28 'contentPath': '&dtml-contentPath;'}
29 );
30 //-->
31 </script>