Created
September 5, 2012 14:22
-
-
Save xfenix/3637404 to your computer and use it in GitHub Desktop.
Grappelli ckeditor simple integration with solved collapsable problem and django-filebrowser
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends "admin/base.html" %} | |
{% load i18n %} | |
{% block extrahead %} | |
<script type="text/javascript" src="/static/ckeditor/ckeditor.js"></script> | |
<script type="text/javascript"> | |
grp.jQuery(function(){ | |
config = { | |
'toolbar': [ | |
[ | |
'Undo', 'Redo', | |
'Styles', | |
'Bold', 'Italic', 'Underline', | |
'-', 'Link', 'Unlink', 'Anchor', 'Image', | |
'-', 'Maximize', | |
], | |
[ 'Table', | |
'-', 'BulletedList', 'NumberedList', | |
'-', 'Cut','Copy','Paste','PasteFromWord', | |
'-', 'SpecialChar', | |
'-', 'Source' | |
] | |
], | |
'forcePasteAsPlainText': true, | |
'filebrowserBrowseUrl': '/admin/filebrowser/browse/?pop=3', | |
}; | |
grp.jQuery('textarea').click(function() { | |
CKEDITOR.replace(grp.jQuery(this)[0], config); | |
}); | |
}); | |
</script> | |
{% endblock %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment