Hello!
I'm working on a feature that involves one of the CKEditor dialog windows to "pop-up" upon a click event from a button on an existing dialog window, to no avail.
I've tried to tackle this problem by creating another instance of a dialog window in the "onClick" method of my button declaration (as shown in the code snippet below). In Firebug (I'm working with this editor on Firefox), however, I'm getting an "invalid label" error for the inner "minWidth" label of my code.
var iconPath = this.path + 'images/analog.gif'; //My "main" dialog window editor.addCommand('Analog', new CKEDITOR.dialogCommand('Analog')); //The dialog window that will be called from the main dialog window editor.addCommand('foo', new CKEDITOR.dialogCommand('foo')); editor.ui.addButton( 'Analog', { label: 'Edit Properties', command: 'Analog', icon: iconPath } ); CKEDITOR.dialog.add( 'Analog', function ( editor ) { return { title : 'Main Properties', minWidth : 400, minHeight : 200, contents : [ { id : 'tab1', label : 'Basic Settings', elements : [ { type : 'button', id : 'buttonId', label: 'Properties', title: 'Properties Title', onClick : CKEDITOR.dialog.add('foo', function (editor) { return { title : 'Inner Properties', minWidth : 400, minHeight : 200, contents : [ { id : 'tab2', label : 'Settings', elements : [ ] } ] }; }); } ] } ] }; } );
I've also tried to declare the dialog separately from the main dialog, calling the function in the "onClick" method instead of declaring the function inside it:
var iconPath = this.path + 'images/analog.gif'; //My "main" dialog window editor.addCommand('Analog', new CKEDITOR.dialogCommand('Analog')); //The dialog window that will be called from the main dialog window editor.addCommand('foo', new CKEDITOR.dialogCommand('foo')); editor.ui.addButton( 'Analog', { label: 'Edit Properties', command: 'Analog', icon: iconPath } ); CKEDITOR.dialog.add( 'foo', function ( editor ) { return { title : 'Inner Properties', minWidth : 400, minHeight : 200, contents : [ { id : 'tab1', label : 'some tab', elements : [ { } ] } ] }; } ); CKEDITOR.dialog.add( 'Analog', function ( editor ) { return { title : 'Main Properties', minWidth : 400, minHeight : 200, contents : [ { id : 'tab1', label : 'Basic Settings', elements : [ { type : 'button', id : 'buttonId', label: 'Properties', title: 'Properties Title', onClick : 'foo' } ] } ] }; } );
In this situation, I get an error stating that "v.apply is not a function" in the ckeditor.js file.
I've been stuck on this feature for a few days now (and I'm on a major time crunch for this project), so any help would be much appreciated!
* I originally posted this under CKFinder Support, but I deleted it and put it under the right forum *
- Kylie Taitano
Did you ever figure this out?
Did you ever figure this out? I'm trying to do the same thing and am looking for some documentation for it.