On va quand même mettre config.js en python, car le config.basePath de ckeditor est...
authorBenoît Pin <pin@cri.ensmp.fr>
Tue, 16 Aug 2011 11:03:55 +0000 (13:03 +0200)
committerBenoît Pin <pin@cri.ensmp.fr>
Tue, 16 Aug 2011 11:03:55 +0000 (13:03 +0200)
skins/ckeditor/config.js.py [moved from skins/ckeditor/config.js with 77% similarity]

similarity index 77%
rename from skins/ckeditor/config.js
rename to skins/ckeditor/config.js.py
index 1ce2adb..3c00463 100644 (file)
@@ -1,4 +1,10 @@
-/*\r
+##parameters=\r
+from Products.CMFCore.utils import getToolByName\r
+context.REQUEST.RESPONSE.setHeader('content-type', 'application/javascript; charset=utf-8')\r
+utool = getToolByName(context, 'portal_url')\r
+\r
+print """\r
+/*\r
 Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.\r
 For licensing, see LICENSE.html or http://ckeditor.com/license\r
 */\r
@@ -22,4 +28,6 @@ CKEDITOR.editorConfig = function( config )
        ];\r
        \r
        config.height = '500px';\r
-};\r
+       config.filebrowserBrowseUrl = '%(portal_url)s';\r
+};""" % {'portal_url' : utool()}\r
+return printed\r