Hi,
I am having some problem figuring out how to "select" a CKeditor instance. Right now I have 4 textareas as follows:
<textarea id="instance_1">This is test</textarea>
<textarea id="instance_2">This is test</textarea>
<textarea id="instance_3">This is test</textarea>
<textarea id="instance_4">This is test</textarea>
All 4 were replaced into CKeditor. I had written a small jQuery function that inserts some text into 1 one the editors when it is triggered.
var editorName = 'instance_1'
CKEDITOR.instances.editorName.insertHtml('<p>This is some text</p>');
This didn't work. I tried focusManager as well and didn't work either:
var focusManager = new CKEDITOR.focusManager('instance_1');
focusManager.focus();
focusManager.insertHtml('<p>This is some text</p>');
Anyone have suggestions on how to assign the instance name on it?
I am having some problem figuring out how to "select" a CKeditor instance. Right now I have 4 textareas as follows:
<textarea id="instance_1">This is test</textarea>
<textarea id="instance_2">This is test</textarea>
<textarea id="instance_3">This is test</textarea>
<textarea id="instance_4">This is test</textarea>
All 4 were replaced into CKeditor. I had written a small jQuery function that inserts some text into 1 one the editors when it is triggered.
var editorName = 'instance_1'
CKEDITOR.instances.editorName.insertHtml('<p>This is some text</p>');
This didn't work. I tried focusManager as well and didn't work either:
var focusManager = new CKEDITOR.focusManager('instance_1');
focusManager.focus();
focusManager.insertHtml('<p>This is some text</p>');
Anyone have suggestions on how to assign the instance name on it?
Re: "select" a CKeditor instance
var instance_name = 'instance_1';
CKEDITOR.instances[instance_name].insertHtml('<p>Test</p>');