1 <html i18n:domain="plinn">
3 <div metal:define-macro="wysiwygEditorBox"
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;
15 style style"></textarea>
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 CKEDITOR.replace('%(inputname)s');
20 CKEDITOR.instances['%(inputname)s'].contentPath = '%(contentPath)s';
22 var ckForm = document.getElementById('%(inputname)s').form;
23 if ((AJAX_CONFIG & 2) == 2) {
24 var formManager = new FormManager(ckForm, document.getElementById('mainCell'));
25 formManager.onBeforeSubmit = function(manager) {
26 var editor = CKEDITOR.instances['%(inputname)s'];
27 editor.updateElement();
31 ''' % {'inputname' : inputname, 'contentPath' : here.absolute_url(relative=1)}">