Set the global variable "CKEDITOR_BASEPATH" if defined (closes #15956422)
authorKatia Saurfelt <katia.saurfelt@logilab.fr>
Wed, 26 Oct 2016 12:55:46 +0200
changeset 14 cdd509ace482
parent 12 f5119788b00c
child 15 e87e7a77d9b2
Set the global variable "CKEDITOR_BASEPATH" if defined (closes #15956422)
README
__init__.py
--- a/README	Wed Oct 26 12:43:31 2016 +0200
+++ b/README	Wed Oct 26 12:55:46 2016 +0200
@@ -1,3 +1,10 @@
 Summary
 -------
 WYSIWYG js editor with ckeditor
+
+
+If don't want to use ckeditor from //cdn set following variables in
+uiprops of your main cube:
+
+  CKEDITOR_URL = data('ckeditor/ckeditor.js')
+  CKEDITOR_BASEPATH = data('ckeditor/')
--- a/__init__.py	Wed Oct 26 12:43:31 2016 +0200
+++ b/__init__.py	Wed Oct 26 12:55:46 2016 +0200
@@ -28,6 +28,9 @@
         }
       }, 200);
     ''')
+    base_path = self.uiprops.get('CKEDITOR_BASEPATH')
+    if base_path:
+        self.html_headers.define_var('CKEDITOR_BASEPATH', base_path)
     self.html_headers.define_var('cklang', self.lang)
     self.html_headers.define_var('ckconfigpath',
                                  self.data_url('ckeditor-config.js'))