views:

131

answers:

1

Each input field in the CKEditor dialogs are renamed with a unique number, but the number changes depending on what options are visible.

I need to reference 'txtUrl' which has an id something like #35_textInput.

So far I have discovered that something like this should work:

alert(CKEDITOR.instances.myElement.document.$.body.getId('txtUrl'));

But it doesn't. Please help.

A: 

Hi, try this:

var dialog = this.getDialog(); var elem = dialog.getContentElement('info','txtUrl');

rio
Hi Rio, thanks so much for replying and sorry for the delay.I have tried the following but the dialog fails to load (no error message in FireBug either)...CKEDITOR.dialog.add('link', function (a) { var b = function () { var s = this.getDialog(), z = s.getContentElement('info', 'txtUrl'); z.setValue('asdasd');If you are able to help I would be eternally grateful and more than happy to make a donation to a charity of your choice!Regards, R