Hi,
I'm new to using CKEdit and unfortunately the documentation is a little bit light right now. What's the best way to open a dialog one it's been registered. For example if I had the following element in an existing dialog
What would be the line of code to open the dialog after it's been registered in the click event? Obviously I need to do a (my_just_added_dialog).show(). What I'm not sure about is how to get the dialog I just registered?
Thanks in advance for any help!
I'm new to using CKEdit and unfortunately the documentation is a little bit light right now. What's the best way to open a dialog one it's been registered. For example if I had the following element in an existing dialog
{ type : 'button', id : 'browse', align : 'center', label : editor.lang.common.browseServer, hidden : false, onClick: function() { //load the image browser dialog var dialog = this.getDialog(); dialog.hide(); CKEDITOR.dialog.add( 'testOnly', function( editor ) { return { title : 'Test Dialog', resizable : CKEDITOR.DIALOG_RESIZE_BOTH, minWidth : 500, minHeight : 400, contents : [ { id : 'tab1', label : 'First Tab', title : 'First Tab Title', accessKey : 'Q', elements : [ { type : 'text', label : 'Test Text 1', id : 'testText1', 'default' : 'hello world!' } ] } ] }; }); } }
What would be the line of code to open the dialog after it's been registered in the click event? Obviously I need to do a (my_just_added_dialog).show(). What I'm not sure about is how to get the dialog I just registered?
Thanks in advance for any help!
Re: What's the best way to open a dialog
So I figured out how it's done. This example shows how to create and open dialogs: http://ckeditor.com/ckeditor/3.0rc/_sam ... ialog.html
Turns out you have to create a command object to open the dialog.
I've moved the code into a plugin so that the button only executes the command I create.
//plugin.js