[Rt-commit] rt branch, 4.2/ckeditor-base-path, created. rt-4.2.3-87-g0501b0c

? sunnavy sunnavy at bestpractical.com
Thu Apr 24 11:42:25 EDT 2014


The branch, 4.2/ckeditor-base-path has been created
        at  0501b0c479e7cd306dcec2f034e31a1cbbf1db26 (commit)

- Log -----------------------------------------------------------------
commit 0501b0c479e7cd306dcec2f034e31a1cbbf1db26
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Apr 24 23:28:45 2014 +0800

    use CKEDITOR_BASEPATH instead to specify ckeditor's basePath
    
    ckeditor figures basePath from the location of ckeditor.js specified in
    <script>'s src, but if we are in production mode ($DevelMode is false), since
    ckeditor.js is also appended into /NoAuth/js/squished-...js, ckeditor fails to
    find the correct codePath.
    
    we can get around it by using CKEDITOR_BASEPATH global variable instead.
    
    see also #29780

diff --git a/share/html/Elements/JavascriptConfig b/share/html/Elements/JavascriptConfig
index 11390e5..16f2e35 100644
--- a/share/html/Elements/JavascriptConfig
+++ b/share/html/Elements/JavascriptConfig
@@ -81,4 +81,5 @@ RT.Config      = <% JSON( $Config      ) |n%>;
 
 RT.I18N = {};
 RT.I18N.Catalog = <% JSON( $Catalog ) |n %>;
+CKEDITOR_BASEPATH=RT.Config.WebPath + "/static/RichText/";
 </script>
diff --git a/share/static/js/util.js b/share/static/js/util.js
index 003109b..3c67c02 100644
--- a/share/static/js/util.js
+++ b/share/static/js/util.js
@@ -253,7 +253,6 @@ function ReplaceAllTextareas() {
             type.val("text/html");
 
             CKEDITOR.replace(textArea.name,{ width: '100%', height: RT.Config.MessageBoxRichTextHeight });
-            CKEDITOR.basePath = RT.Config.WebPath + "/static/RichText/";
 
             jQuery("#" + textArea.name + "___Frame").addClass("richtext-editor");
         }

-----------------------------------------------------------------------


More information about the rt-commit mailing list