From a1bb533b60d8219a5d00d53ace7bf23baccf1c49 Mon Sep 17 00:00:00 2001 From: cahrens Date: Thu, 17 Jan 2013 21:04:17 -0500 Subject: [PATCH 1/3] Workaround for sandbox. --- common/lib/xmodule/xmodule/js/src/html/edit.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/lib/xmodule/xmodule/js/src/html/edit.coffee b/common/lib/xmodule/xmodule/js/src/html/edit.coffee index 2902f4d1c9..92c1eae38d 100644 --- a/common/lib/xmodule/xmodule/js/src/html/edit.coffee +++ b/common/lib/xmodule/xmodule/js/src/html/edit.coffee @@ -11,7 +11,7 @@ class @HTMLEditingDescriptor }) $(@advanced_editor.getWrapperElement()).addClass(HTMLEditingDescriptor.isInactiveClass) - + tinyMCE.baseURL = window.location.protocol + "//" + window.location.host + '/static/js/vendor/tiny_mce' @tiny_mce_textarea = $(".tiny-mce", @element).tinymce({ script_url : '/static/js/vendor/tiny_mce/tiny_mce.js', theme : "advanced", From 8cca193903d400eba4bdd4f0abdb0695675066d2 Mon Sep 17 00:00:00 2001 From: cahrens Date: Thu, 17 Jan 2013 21:06:05 -0500 Subject: [PATCH 2/3] Add a comment. --- common/lib/xmodule/xmodule/js/src/html/edit.coffee | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/lib/xmodule/xmodule/js/src/html/edit.coffee b/common/lib/xmodule/xmodule/js/src/html/edit.coffee index 92c1eae38d..b21042580d 100644 --- a/common/lib/xmodule/xmodule/js/src/html/edit.coffee +++ b/common/lib/xmodule/xmodule/js/src/html/edit.coffee @@ -11,6 +11,9 @@ class @HTMLEditingDescriptor }) $(@advanced_editor.getWrapperElement()).addClass(HTMLEditingDescriptor.isInactiveClass) + +# This is a workaround for the fact that tinyMCE's baseURL property is not getting correctly set on AWS +# instances (like sandbox). It is not necessary to explicitly set baseURL when running locally. tinyMCE.baseURL = window.location.protocol + "//" + window.location.host + '/static/js/vendor/tiny_mce' @tiny_mce_textarea = $(".tiny-mce", @element).tinymce({ script_url : '/static/js/vendor/tiny_mce/tiny_mce.js', From a4196ffa00a98684d8f77e81d0ca7477e90a4bb9 Mon Sep 17 00:00:00 2001 From: cahrens Date: Thu, 17 Jan 2013 21:15:38 -0500 Subject: [PATCH 3/3] Relative path seems to work. --- common/lib/xmodule/xmodule/js/src/html/edit.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/lib/xmodule/xmodule/js/src/html/edit.coffee b/common/lib/xmodule/xmodule/js/src/html/edit.coffee index b21042580d..dfb197e204 100644 --- a/common/lib/xmodule/xmodule/js/src/html/edit.coffee +++ b/common/lib/xmodule/xmodule/js/src/html/edit.coffee @@ -14,7 +14,7 @@ class @HTMLEditingDescriptor # This is a workaround for the fact that tinyMCE's baseURL property is not getting correctly set on AWS # instances (like sandbox). It is not necessary to explicitly set baseURL when running locally. - tinyMCE.baseURL = window.location.protocol + "//" + window.location.host + '/static/js/vendor/tiny_mce' + tinyMCE.baseURL = '/static/js/vendor/tiny_mce' @tiny_mce_textarea = $(".tiny-mce", @element).tinymce({ script_url : '/static/js/vendor/tiny_mce/tiny_mce.js', theme : "advanced",