Index: editors/js/ckeditor-3.0.js =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/wysiwyg/editors/js/ckeditor-3.0.js,v retrieving revision 1.9 diff -u -p -r1.9 ckeditor-3.0.js --- editors/js/ckeditor-3.0.js 20 Dec 2010 03:42:40 -0000 1.9 +++ editors/js/ckeditor-3.0.js 25 Dec 2010 18:57:15 -0000 @@ -167,10 +167,13 @@ Drupal.wysiwyg.editor.instance.ckeditor if (typeof Drupal.wysiwyg.plugins[pluginName].invoke == 'function') { var pluginCommand = { exec: function (editor) { - var data = { format: 'html' }; + var data = { format: 'html', node: null, content: '' }; 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; @@ -179,14 +182,10 @@ Drupal.wysiwyg.editor.instance.ckeditor data.content = selection.getNative().toString(); } } - else { + else if (data.node) { // content is supposed to contain the "outerHTML". - data.content = data.node.$.parentNode.innerHTML; + data.content = data.node.parentNode.innerHTML; } - data.node = data.node.$; - } - else { - data.content = ''; } Drupal.wysiwyg.plugins[pluginName].invoke(data, pluginSettings, editor.name); }