X-Git-Url: https://scm.cri.ensmp.fr/git/Plinn.git/blobdiff_plain/f67e7cd539830ef686684268c7b7c58136ba97cc..e84f5c7fa632192d9c030185820021c3a88a8f4e:/skins/generic/wysiwyg_support.pt

diff --git a/skins/generic/wysiwyg_support.pt b/skins/generic/wysiwyg_support.pt
index 1fff09e..2e9528c 100644
--- a/skins/generic/wysiwyg_support.pt
+++ b/skins/generic/wysiwyg_support.pt
@@ -16,9 +16,11 @@
   <div>
     <script type="text/javascript" tal:attributes="src string:$portal_url/ckeditor/ckeditor.js"></script>
     <script type="text/javascript" tal:content="structure python:'''
-      CKEDITOR.replace('%(inputname)s');
-      CKEDITOR.instances['%(inputname)s'].contentPath = '%(contentPath)s';
       (function(){
+      CKEDITOR.replace('%(inputname)s');
+      var ck = CKEDITOR.instances['%(inputname)s'];
+      ck.contentPath = '%(contentPath)s';
+      ck.config.baseHref = '%(baseHref)s';
       var ckForm = document.getElementById('%(inputname)s').form;
   		if ((AJAX_CONFIG & 2) == 2) {
     		var formManager = new FormManager(ckForm, document.getElementById('mainCell'));
@@ -28,37 +30,11 @@
     		};
   		}
 		  })();
-      ''' % {'inputname' : inputname, 'contentPath' : here.absolute_url(relative=1)}">
+      ''' % {'inputname' : inputname,
+             'contentPath' : here.absolute_url(relative=1),
+             'baseHref' : here.absolute_url()+'/'}">
     </script>
   </div>
 </div>
 
-	<div metal:define-macro="textFormatSelector"
-			 tal:define="wysiwyg python: here.portal_membership.getAuthenticatedMember().getProperty('wysiwyg_editor')!='None';
-			 						 text_format python: getattr(here,'text_format','html')"
-			 tal:omit-tag="" i18n:domain="plinn">
-		<input type="hidden" name="text_format" value="html" tal:condition="wysiwyg" />
-		
-		<div tal:condition="not: wysiwyg">
-			<label i18n:translate="">Format</label><br/>
-			<label>
-				<input type="radio" name="text_format" value="structured-text"
-							 tal:attributes="checked python:test(text_format=='structured-text', 1, None);" />
-				<span i18n:translate="" tal:omit-tag="">Structured text</span>
-			</label><br />
-		
-			<label>
-				<input type="radio" name="text_format" value="html"
-							 tal:attributes="checked python:test(text_format=='html', 1, None)" />
-				<span i18n:translate="" tal:omit-tag="">HTML</span>
-			</label><br />
-		
-			<label>
-				<input type="radio" name="text_format" value="plain"
-							 tal:attributes="checked python:test(text_format=='plain', 1, None);" />
-				<span i18n:translate="" tal:omit-tag="">Plain text</span>
-			</label>
-		</div>
-	</div>
-
 </html>
\ No newline at end of file