basepath for ckeditor
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
diff --git a/sapling/ckeditor/templates/ckeditor/ckeditor_script.html b/sapling/ckeditor/templates/ckeditor/ckeditor_script.html | |
index 7e3f404..6f536be 100644 | |
--- a/sapling/ckeditor/templates/ckeditor/ckeditor_script.html | |
+++ b/sapling/ckeditor/templates/ckeditor/ckeditor_script.html | |
@@ -1,5 +1,6 @@ | |
<script type="text/javascript"> | |
<!-- | |
+CKEDITOR.basePath = '{{ STATIC_URL }}js/ckeditor/'; | |
CKEDITOR.replace('id_{{ name }}'{% if config %}, {{ config|safe }}{% endif %}); | |
--> | |
-</script> | |
\ No newline at end of file | |
+</script> | |
diff --git a/sapling/ckeditor/widgets.py b/sapling/ckeditor/widgets.py | |
index ea83bc8..9a604dc 100644 | |
--- a/sapling/ckeditor/widgets.py | |
+++ b/sapling/ckeditor/widgets.py | |
@@ -101,7 +101,8 @@ class CKEditor(forms.Textarea): | |
config_str = '' | |
context = { | |
'name': name, | |
- 'config': config_str | |
+ 'config': config_str, | |
+ 'STATIC_URL': settings.STATIC_URL, | |
} | |
return rendered + mark_safe(render_to_string( | |
'ckeditor/ckeditor_script.html', context |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment