Hello Guys,
I am new to CKEditor. I have this task to convert FCKeditor to CKeditor. Everything goes fine except for some functions that when I converted it, it does not work anymore and it gives this error:
oCKEditor is undefined.
Here is what I did:
FCKEditor code:
I convert it to CKEditor code:
Why does I have this error?
Lastly, the opener.focus() and self.close() javascript codes does not work anymore. These work before in FCKeditor codes.
Thanks,
-Neo_phyte
I am new to CKEditor. I have this task to convert FCKeditor to CKeditor. Everything goes fine except for some functions that when I converted it, it does not work anymore and it gives this error:
oCKEditor is undefined.
Here is what I did:
FCKEditor code:
function overwriteTextbox(textboxID, overwriteValue) {
var oEditor = opener.FCKeditorAPI.GetInstance(textboxID); //you have to reach the API in the opener
oEditor.SetHTML(overwriteValue);
}
I convert it to CKEditor code:
function overwriteTextbox(textboxID, overwriteValue) {
var oCKEditor = opener.CKEDITOR.instances.textboxID; //you have to reach the API in the opener
oCKEditor.setData(overwriteValue);
}
Why does I have this error?
Lastly, the opener.focus() and self.close() javascript codes does not work anymore. These work before in FCKeditor codes.
Thanks,
-Neo_phyte

Re: conversion for this function gives me undefined error
<script type="text/javascript"> var frm = opener.getElement('frmMain'); var undef = frm.plop; <% for each emailType in request("emailTypes") %> if (frm.<%= destinationPrefix %>_<%= emailType %>EmailSubject != undef) { frm.<%= destinationPrefix %>_<%= emailType %>EmailSubject.value = '<%= replace("" & rs(sourcePrefix & "_" & emailType & "EmailSubject"), "'", "\'") %>'; } if (frm.<%= destinationPrefix %>_<%= emailType %>EmailBody != undef) { overwriteTextbox('<%= destinationPrefix %>_<%= emailType %>EmailBody', '<%= replace(replace("" & rs(sourcePrefix & "_" & emailType & "EmailBody"), "'", "\'"), vbNewLine, "\n") %>'); } <% next %> opener.focus(); self.close(); </script>The error is oCKEditor is undefined. Why it is? And the opener.focus() event and self.close() are not working anymore as it these work before in FCKeditor.
Thanks in advance.
-neo_phyte
Re: conversion for this function gives me undefined error
'undefined' is not or not an object
Please let me know what's wrong with that... Thanks.
Re: conversion for this function gives me undefined error
change to:
That should work now.. Thanks guys....