Hi there,
I'm pretty amazed of ckeditor 3.0 (RC)! It's functionality is awesome and the api seems to be very cool, too. Unfortunately, the documentation is not complete, yet - so it can be quite hard working with it.
What I'm trying to do at the moment, is to add the possibility of adding image files via a web-based filemanager, I already have on my homepage. What I did, was modifying the file /plugins/image/dialogs/image.js, where I added a little button, which opens a popup. Within this popup, I can now select an image and press "Submit". What it does now, is something like this: opener.getElementById('txtUrl'). The goal is, to put the selected image url directly into the url input field, but the problem is that the actual id of this input field looks something like that: '60_textInput'. This wouldn't be a big problem, but I'm having several editor instances in my page and every instance has it's own id for the input field (e.g. '65_textInput').
I just can't figure out, how I can put data into an into an input field via my popup.
I tried to access the input field as you can see in the following code, but somehow, it was impossible for me to get the actual id of the input field.
CKEDITOR.on( 'dialogDefinition', function( ev ) { var dialogName = ev.data.name; var dialogDefinition = ev.data.definition; if ( dialogName == 'image' ) { var infoTab = dialogDefinition.getContents( 'info' ).elements; //returns the type CKEDITOR.dialog.uiElementDefinition alert(infoTab[0].children[1].children[0].type); }}