[Rt-commit] rt branch, 4.2/ckeditor-base-path, created. rt-4.2.4-22-gaf0d313

? sunnavy sunnavy at bestpractical.com
Fri May 23 08:06:19 EDT 2014


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

- Log -----------------------------------------------------------------
commit 82d763ab9ea4af3e6a227eb91e0f028809eb528a
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 basePath.
    
    we can get around it by using CKEDITOR_BASEPATH global variable instead.
    
    see also #29780 and #29987

diff --git a/share/static/js/util.js b/share/static/js/util.js
index 003109b..b665c0e 100644
--- a/share/static/js/util.js
+++ b/share/static/js/util.js
@@ -230,6 +230,7 @@ function textToHTML(value) {
                 .replace(/\n/g,   "\n<br />");
 };
 
+CKEDITOR_BASEPATH=RT.Config.WebPath + "/static/RichText/";
 function ReplaceAllTextareas() {
     var sAgent = navigator.userAgent.toLowerCase();
     if (!CKEDITOR.env.isCompatible ||
@@ -253,7 +254,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");
         }

commit af0d313d1544828401b1e406241d61b4e1a6efbe
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri May 23 10:24:44 2014 +0800

    Revert "explicitly set contentsCss in ckeditor config"
    
    This reverts commit 0a3badea2d49615f47d971e9d94ab9b11a87afe0.
    
    since we explicitly set ckeditor's basePath by global var CKEDITOR_BASEPATH,
    this commit is not necessary any more

diff --git a/share/static/RichText/config.js b/share/static/RichText/config.js
index 35ca412..8317bfc 100644
--- a/share/static/RichText/config.js
+++ b/share/static/RichText/config.js
@@ -44,5 +44,4 @@ config.font_names =
     'Times New Roman/Times New Roman, Times, serif;' +
     'Trebuchet MS/Trebuchet MS, Helvetica, sans-serif;' +
     'Verdana/Verdana, Geneva, sans-serif';
-config.contentsCss = CKEDITOR.basePath + 'contents.css'; // won't need this after ckeditor 4.3.2
 };

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


More information about the rt-commit mailing list