Versement catalogue solr dans Plinn core
[Plinn.git] / skins / generic / wysiwyg_support.pt
1 <html i18n:domain="plinn">
2
3 <div metal:define-macro="wysiwygEditorBox"
4 tal:omit-tag="">
5
6
7 <textarea cols="80" rows="25"
8 tal:content="inputvalue"
9 tal:define="defaultStyle string:width: 99%;; height: 450px;; margin-top: 2px;; border: 1px solid #8cacbb;;;
10 style style|defaultStyle;"
11 tal:attributes="name inputname;
12 id inputname;
13 rows rows|default;
14 cols cols|default;
15 style style"></textarea>
16 <div>
17 <script type="text/javascript" tal:attributes="src string:$portal_url/ckeditor/ckeditor.js"></script>
18 <script type="text/javascript" tal:content="structure python:'''
19 (function(){
20 CKEDITOR.replace('%(inputname)s');
21 var ck = CKEDITOR.instances['%(inputname)s'];
22 ck.contentPath = '%(contentPath)s';
23 ck.config.baseHref = '%(baseHref)s';
24 var ckForm = document.getElementById('%(inputname)s').form;
25 if ((AJAX_CONFIG & 2) == 2) {
26 var formManager = new FormManager(ckForm, document.getElementById('mainCell'));
27 formManager.onBeforeSubmit = function(manager) {
28 var editor = CKEDITOR.instances['%(inputname)s'];
29 editor.updateElement();
30 };
31 }
32 })();
33 ''' % {'inputname' : inputname,
34 'contentPath' : here.absolute_url(relative=1),
35 'baseHref' : here.absolute_url()+'/'}">
36 </script>
37 </div>
38 </div>
39
40 </html>