On va quand même mettre config.js en python, car le config.basePath de ckeditor est...
[ckeditor.git] / skins / ckeditor / config.js.py
1 ##parameters=
2 from Products.CMFCore.utils import getToolByName
3 context.REQUEST.RESPONSE.setHeader('content-type', 'application/javascript; charset=utf-8')
4 utool = getToolByName(context, 'portal_url')
5
6 print """
7 /*
8 Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
9 For licensing, see LICENSE.html or http://ckeditor.com/license
10 */
11
12 CKEDITOR.editorConfig = function( config )
13 {
14 // Define changes to default configuration here. For example:
15 // config.language = 'fr';
16 // config.uiColor = '#AADC6E';
17 config.toolbar = [
18 { name: 'styles', items : [ 'Styles', 'Format', 'Font', 'FontSize' ] },
19 { name: 'colors', items : [ 'TextColor', 'BGColor' ] },
20 { name: 'document', items : [ 'Maximize', 'ShowBlocks', 'Source'] },
21 { name: 'editing', items : [ 'Find','Replace', '-', 'SelectAll'] },
22 { name: 'clipboard', items : [ 'PasteFromWord', '-', 'Undo', 'Redo' ] },
23 '/',
24 { name: 'basicstyles', items : [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat' ] },
25 { name: 'paragraph', items : [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'CreateDiv', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'] },
26 { name: 'links', items : [ 'Link', 'Unlink', 'Anchor' ] },
27 { name: 'insert', items : [ 'Image', 'Flash', 'Table', 'HorizontalRule', 'SpecialChar', 'PageBreak'] },
28 ];
29
30 config.height = '500px';
31 config.filebrowserBrowseUrl = '%(portal_url)s';
32 };""" % {'portal_url' : utool()}
33 return printed