2 Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
3 For licensing, see LICENSE.html or http://ckeditor.com/license
8 CKEDITOR.plugins.add( 'iframe',
10 requires : [ 'dialog', 'fakeobjects' ],
11 init : function( editor )
13 var pluginName = 'iframe',
14 lang = editor.lang.iframe;
16 CKEDITOR.dialog.add( pluginName, this.path + 'dialogs/iframe.js' );
17 editor.addCommand( pluginName, new CKEDITOR.dialogCommand( pluginName ) );
22 'background-image: url(' + CKEDITOR.getUrl( this.path + 'images/placeholder.png' ) + ');' +
23 'background-position: center center;' +
24 'background-repeat: no-repeat;' +
25 'border: 1px solid #a9a9a9;' +
31 editor.ui.addButton( 'Iframe',
37 editor.on( 'doubleclick', function( evt )
39 var element = evt.data.element;
40 if ( element.is( 'img' ) && element.data( 'cke-real-element-type' ) == 'iframe' )
41 evt.data.dialog = 'iframe';
44 if ( editor.addMenuItems )
57 // If the "contextmenu" plugin is loaded, register the listeners.
58 if ( editor.contextMenu )
60 editor.contextMenu.addListener( function( element, selection )
62 if ( element && element.is( 'img' ) && element.data( 'cke-real-element-type' ) == 'iframe' )
63 return { iframe : CKEDITOR.TRISTATE_OFF };
67 afterInit : function( editor )
69 var dataProcessor = editor.dataProcessor,
70 dataFilter = dataProcessor && dataProcessor.dataFilter;
78 iframe : function( element )
80 return editor.createFakeParserElement( element, 'cke_iframe', 'iframe', true );