summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.txt1
-rw-r--r--editors/js/wymeditor.js3
-rw-r--r--editors/wymeditor.inc6
3 files changed, 10 insertions, 0 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 36ee0c3..8b99e55 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -6,6 +6,7 @@ Wysiwyg x.x-x.x, xxxx-xx-xx
Wysiwyg 6.x-2.x, xxxx-xx-xx
---------------------------
+#362137 by jfh, sun: Fixed WYMeditor broken when JS/CSS aggregation is enabled.
#328252 by sun: Added TinyMCE plugin BBCode for 3.x.
#429926 by TwoD, sun: Fixed TinyMCE broken due to renamed Flash/Media plugin.
#342864 by davexoxide, sun: Added YUI editor support.
diff --git a/editors/js/wymeditor.js b/editors/js/wymeditor.js
index d9cdf3c..dea6ef7 100644
--- a/editors/js/wymeditor.js
+++ b/editors/js/wymeditor.js
@@ -4,6 +4,9 @@
* Attach this editor to a target element.
*/
Drupal.wysiwyg.editor.attach.wymeditor = function(context, params, settings) {
+ // Prepend basePath to wymPath.
+ settings.wymPath = settings.basePath + settings.wymPath;
+ // Attach editor.
$('#' + params.field).wymeditor(settings);
};
diff --git a/editors/wymeditor.inc b/editors/wymeditor.inc
index 2d7ec83..4a7479b 100644
--- a/editors/wymeditor.inc
+++ b/editors/wymeditor.inc
@@ -78,7 +78,13 @@ function wysiwyg_wymeditor_version($editor) {
* Drupal.settings.wysiwyg.configs.{editor}
*/
function wysiwyg_wymeditor_settings($editor, $config, $theme) {
+ // @todo Setup $library in wysiwyg_load_editor() already.
+ $library = (isset($editor['library']) ? $editor['library'] : key($editor['libraries']));
$settings = array(
+ 'basePath' => base_path() . $editor['library path'] . '/',
+ 'wymPath' => $editor['libraries'][$library]['files'][0],
+ // @todo Does not work in Drupal; jQuery can live anywhere.
+ 'jQueryPath' => base_path() . 'misc/jquery.js',
'updateSelector' => '.form-submit',
'skin' => $theme,
);