ckeditor url can be configured with uiprops
authorSamuel Trégouët <samuel.tregouet@logilab.fr>
Tue, 15 Mar 2016 17:17:06 +0100
changeset 5 dd9529d42509
parent 2 bd0cfeca3507
child 6 e378db67b744
ckeditor url can be configured with uiprops closes #13521192
__init__.py
--- a/__init__.py	Tue Mar 15 17:11:59 2016 +0100
+++ b/__init__.py	Tue Mar 15 17:17:06 2016 +0100
@@ -12,7 +12,9 @@
 @monkeypatch(_CubicWebRequestBase)
 @cached  # so it's writed only once
 def fckeditor_config(self):
-    ckeditor_url = '//cdn.ckeditor.com/4.5.7/standard/ckeditor.js'
+    ckeditor_url = self.uiprops.get(
+        'CKEDITOR_URL',
+        '//cdn.ckeditor.com/4.5.7/standard/ckeditor.js')
     self.add_js(ckeditor_url, localfile=False)
     self.add_js('initwysiwyg.js')
     self.add_onload('buildWysiwygEditors()')