Referencing text input fields in CKEditor dialogs

Posted by rt-uk on Stack Overflow See other posts from Stack Overflow or by rt-uk
Published on 2010-05-15T12:37:08Z Indexed on 2010/05/15 12:44 UTC
Read the original article Hit count: 199

Filed under:
|
|

Hi, I've been playing around with this for a couple of weeks now with no success...

In a CKEditor dialog, text input fields are renamed with a unique number - e.g. id: 'txtUrl' will become something like id='27_textinput'.

How do I reference this?

// I feel it should be something like:

var myfield = CKEDITOR.instances.myElement.document.$.body.getId('txtUrl');

// or maybe:

var myfield = CKEDITOR.dialog.getContentElement('info','txtUrl');

// and then:

myfield.value = 'myvalue';

But these don't work. Please help! Thanks in advance, R

© Stack Overflow or respective owner

Related posts about ckeditor

Related posts about reference