I am using CKEditor, and referring to the CKEditor instance, I need to use a variable. But, since calling an instance is an object, I'm really not sure how to do this.
I use:
CKEDITOR.instances.textarea123.insertHtml('<p>Whatever</p>');
The problem is that I need the variable 123, because I need to change the instance based on the loaded editor page.
So how can I use a variable in the name of an object?
For obvious reasons, the following does not work, but I need to get it to "pretend":
var id = 354; CKEDITOR.instances.textarea+id+.insertHtml('<p>Whatever</p>');
javascript object ckeditor
Nic Hubbard Oct. 14 '09 at 15:57 2009-10-14 15:57
source share