(function ($) { /** * Wysiwyg plugin button implementation for NodeEmbed plugin. */ Drupal.wysiwyg.plugins.node_embed = { /** * Return whether the passed node belongs to this plugin. * * @param node * The currently focused DOM element in the editor content. */ isNode: function(node) { return ($(node).is('img.wysiwyg-node_embed')); }, /** * Execute the button. * * @param data * An object containing data about the current selection: * - format: 'html' when the passed data is HTML content, 'text' when the * passed data is plain-text content. * - node: When 'format' is 'html', the focused DOM element in the editor. * - content: The textual representation of the focused/selected editor * content. * @param settings * The plugin settings, as provided in the plugin's PHP include file. * @param instanceId * The ID of the current editor instance. */ invoke: function(data, settings, instanceId) { // Show the node selection Dialog. var iframeSrc = Drupal.settings.basePath + 'ckeditor-node-embed'; var dialogMarkup = '