diff --git a/editors/js/ckeditor-3.0.js b/editors/js/ckeditor-3.0.js index efa2fe0..60c9c0f 100644 --- a/editors/js/ckeditor-3.0.js +++ b/editors/js/ckeditor-3.0.js @@ -173,9 +173,6 @@ Drupal.wysiwyg.editor.instance.ckeditor = { var selection = editor.getSelection(); if (selection) { data.node = selection.getSelectedElement(); - if (data.node) { - data.node = data.node.$; - } if (selection.getType() == CKEDITOR.SELECTION_TEXT) { if (CKEDITOR.env.ie) { data.content = selection.getNative().createRange().text; @@ -189,6 +186,8 @@ Drupal.wysiwyg.editor.instance.ckeditor = { data.content = data.node.parentNode.innerHTML; } } + + data.node = data.node ? data.node.$ : null; Drupal.wysiwyg.plugins[pluginName].invoke(data, pluginSettings, editor.name); } };