// embed plugin setup file CKEDITOR.plugins.add( 'bfembed', { init: function(editor) { editor.addCommand('bfembed', new CKEDITOR.dialogCommand('bfembed')); editor.ui.addButton('Embed', { label: FIRSTCLASS.locale.editor.embed.menuitem, command: 'bfembed' }); CKEDITOR.dialog.add('bfembed', this.path + 'dialogs/embed.js'); if (editor.addMenuItems) { editor.addMenuItems({ bfembed: { label: FIRSTCLASS.locale.editor.embed.menuitem, command: 'bfembed', group: 'bfembed' } }); } if (editor.contextMenu) { editor.contextMenu.addListener(function(element, selection) { if (!element) { return null; } var isEmbed = element.is('img'); if (isEmbed && element.getAttribute('src') && element.getAttribute('src').indexOf('EmbedActiveContent.gif') < 0) { isEmbed = false; } return isEmbed ? { bfembed : CKEDITOR.TRISTATE_OFF } : null; }); } } });