Opened 15 years ago

Closed 13 years ago

#4400 closed Bug (invalid)

iframedialog not working correctly

Reported by: wimpie3 Owned by:
Priority: Normal Milestone:
Component: General Version: 3.0
Keywords: Cc: wim.dewijngaert@…

Description (last modified by Alfonso Martínez de Lizarrondo)

<script type="text/javascript" src="ckeditor/ckeditor.js"></script>

<textarea id="editor1" name="editor1">Test</textarea>

<script>
CKEDITOR.plugins.add( 'iframedialog' ) ;
var editor1=CKEDITOR.replace( 'editor1');
editor1.config.toolbar =[['Cut','Copy','Paste','-','MyButton']] ;

editor1.on( 'pluginsLoaded', function( ev ) {
if ( !CKEDITOR.dialog.exists( 'myDialog' ) ) {
   CKEDITOR.dialog.addIframe( 'myDialog', 'title','http://www.google.be',500,400,function(){});
}
editor1.addCommand( 'myDialogCmd', new CKEDITOR.dialogCommand( 'myDialog' ) );
editor1.ui.addButton( 'MyButton', 
{ label : 'My Dialog', command : 'myDialogCmd', icon: 'http://thereality.nl/images/icons/icon_upload.png' }
 );
});

</script>

Change History (4)

comment:1 Changed 15 years ago by wimpie3

Cc: wim.dewijngaert@… added

comment:2 Changed 14 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.1
Priority: HighNormal

Before pushing us to try replicating things here, can you add some explanation on what you're trying to do and what results you're having?

comment:3 Changed 14 years ago by wimpie3

In this example I'm trying to add a button to the toolbar to open Google Maps in an IFRAME.

Next to the cut, copy and paste buttons, I would like a button to appear and when you click on that button, the url www.google.be should open in a IFRAME window.

comment:4 Changed 13 years ago by Alfonso Martínez de Lizarrondo

Description: modified (diff)
Resolution: invalid
Status: newclosed

The correct way to load the iframedialog is to specify it in the extraPlugins configuration:

var editor1=CKEDITOR.replace( 'editor1', {
	toolbar : [['Cut','Copy','Paste','-','MyButton']],
	extraPlugins : 'iframedialog'
	});
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy