Bonjour,
Un premier jet pour cps_schemas/widget_rte_render utilisant FCKeditor
semble vouloir fonctionner... mais j'aimerais trouver une solution plus
"sûre" pour passer la chaîne HTML à javascript.
Pour les aventureux ayant déjà installé FCKeditor dans CPS:
Aller dans portal_skins/cps_schemas, sélectionner widget_rte_render et
cliquer sur customize, puis coller le code ci-dessous.
Sans aucune garantie, ça va sans dire...
Commentaires bienvenus.
--8<--------
<tal:block define="mode options/mode;
id here/getWidgetId;
html_id here/getHtmlWidgetId;
current_name options/current_name;
value options/datastructure/?id;
esc_value
python:modules['string'].replace(value,'\r\n','\\n').replace('\'','\\\'');
portal_url here/portal_url;
parent_url python:here.aq_parent.absolute_url();
server_path request/BASE0;
portal_path python:portal_url.replace(server_path,
'')+'/';
">
<!-- version officielle utilisant epoz
<div style="width:550px; height:300px"
tal:define="locale here/translation_service/getSelectedLanguage|string:en"
tal:content="structure python:here.Epoz(name=html_id, data=value,
lang=locale, style='width:550px; height:220px; border:1px solid #A0A0A0;
border-style:solid;')"></div>
-->
<!-- FCK test 1 -->
<script type="text/javascript" src="" tal:attributes="src
string:${portal_path}fckeditor.js">
</script>
<script type="text/javascript" tal:content="structure string:
<!--
//var oFCKeditor=new FCKeditor('rte_value');
var oFCKeditor=new FCKeditor('${html_id}');
var pathUser = '${request/URLPATH2}/';
oFCKeditor.BasePath='${portal_path}';
oFCKeditor.Value='${esc_value}' ;
oFCKeditor.ToolbarSet='ZopeCmf';
oFCKeditor.Config['EditorAreaCSS']='${portal_path}nuxeo_css1.css';
oFCKeditor.Config['LinkBrowserURL'] = pathUser + 'fck_browse_files.html' ;
oFCKeditor.Config['ImageBrowserURL'] = pathUser +
'fck_browse_images.html' ;
oFCKeditor.Config['FlashBrowserURL'] = pathUser + 'fck_browse_files.html' ;
oFCKeditor.Width=610;
oFCKeditor.Height=410;
oFCKeditor.Create();
-->
">
The FCK Editor Script
</script>
</tal:block>
--8<--------
(à suivre...)
--
didier
_______________________________________________
cps-users-fr
Adresse de la liste : [email protected]
Gestion de l'abonnement : <http://lists.nuxeo.com/mailman/listinfo/cps-users-fr>