Permalink
Browse files

Added admin-extra.js which can be used to override / init admin JavaS…

…cript

- currently this can be used to override the default CKEDITOR settings, by adding these variables (window.CKEDITOR_CONFIG_TOOLBAR, window.CKEDITOR_CONFIG_FORMAT_TAGS) in a custom admin-extra.js in a separate app which should be placed before 'fiber' in INSTALLED_APPS
  • Loading branch information...
1 parent 5ddcaf0 commit bdc313fdb4fae32492720d4d1eb244ee51a4c2b6 @dbunskoek dbunskoek committed Nov 3, 2011
No changes.
@@ -5,22 +5,24 @@ Fiber.enhance_textarea = function(textarea) {
// - fieldsets should be split into tabs
// - collapsible areas should work, etc.
+ window.CKEDITOR_CONFIG_TOOLBAR = window.CKEDITOR_CONFIG_TOOLBAR || [
+ ['Format'],
+ ['Bold','Italic'],
+ ['NumberedList','BulletedList','Outdent','Indent'],
+ ['fPageLink','fFileLink','fImageLink','fCustomLink','fUnlink'],
+ ['fImage','fTable'],
+ ['PasteText','PasteFromWord','RemoveFormat'],
+ ['Maximize'],
+ ['Source']
+ ];
+ window.CKEDITOR_CONFIG_FORMAT_TAGS = window.CKEDITOR_CONFIG_FORMAT_TAGS || 'p;h2;h3;h4';
+
CKEDITOR.replace(textarea, {
language: LANGUAGE_CODE,
extraPlugins: 'fpagelink,ffilelink,fimagelink,fcustomlink,funlink,fimage,ftable,tabletools',
removePlugins: 'scayt,menubutton,forms,image,link',
- toolbar:
- [
- ['Format'],
- ['Bold','Italic'],
- ['NumberedList','BulletedList','Outdent','Indent'],
- ['fPageLink','fFileLink','fImageLink','fCustomLink','fUnlink'],
- ['fImage','fTable'],
- ['PasteText','PasteFromWord','RemoveFormat'],
- ['Maximize'],
- ['Source']
- ],
- format_tags: 'p;h2;h3;h4',
+ toolbar: window.CKEDITOR_CONFIG_TOOLBAR,
+ format_tags: window.CKEDITOR_CONFIG_FORMAT_TAGS,
toolbarCanCollapse: false,
resize_maxWidth: 610,
baseFloatZIndex: 1100
@@ -31,6 +31,7 @@
<script src="{{ STATIC_URL }}fiber/js/file-uploader/fileuploader.js" type="text/javascript"></script>
+<script src="{{ STATIC_URL }}fiber/js/admin-extra.js" type="text/javascript"></script>
<script src="{{ STATIC_URL }}fiber/js/admin.js" type="text/javascript"></script>
{% endcompress %}

0 comments on commit bdc313f

Please sign in to comment.