summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.txt1
-rw-r--r--editors/js/ckeditor-3.0.js12
2 files changed, 13 insertions, 0 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 8ca1271..0dd453b 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -2,6 +2,7 @@
Wysiwyg 6.x-2.x, xxxx-xx-xx
---------------------------
+#748888 by TwoD, sun: Fixed isNode() not called in CKEditor.
#767550 by TwoD, sun, ungeek: Fixed invalid API docs and logic for
$plugin['filename'].
#988200 by sun: Changed static language list to ISO 639 defaults of Drupal core.
diff --git a/editors/js/ckeditor-3.0.js b/editors/js/ckeditor-3.0.js
index 4b186e8..a7aed47 100644
--- a/editors/js/ckeditor-3.0.js
+++ b/editors/js/ckeditor-3.0.js
@@ -109,6 +109,18 @@ Drupal.wysiwyg.editor.attach.ckeditor = function(context, params, settings) {
});
}
},
+
+ selectionChange: function (event) {
+ $.each(Drupal.settings.wysiwyg.plugins[params.format].drupal, function (name) {
+ var plugin = Drupal.wysiwyg.plugins[name];
+ if ($.isFunction(plugin.isNode)) {
+ var node = event.data.selection.getSelectedElement();
+ var state = plugin.isNode(node ? node.$ : null) ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF;
+ event.editor.getCommand(name).setState(state);
+ }
+ });
+ },
+
focus: function(ev) {
Drupal.wysiwyg.activeId = ev.editor.name;
}