hi,
I found that the method of getting the content from the editor was too slow (especially if this is used when in non source mode...):
so here is an alternate way:
Regards
I found that the method of getting the content from the editor was too slow (especially if this is used when in non source mode...):
var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ;
content = oEditor.GetXHTML(true) ;
so here is an alternate way:
function GetContents() {
var iframe1 = document.getElementById('FCKeditor1___Frame');
var tablecell = iframe1.contentWindow.document.getElementById('xEditingArea');
var iframe2 = tablecell.childNodes[0];
var oDoc = iframe2.contentWindow || iframe2.contentDocument;
if (oDoc.document) {
oDoc = oDoc.document;
}
return oDoc.body.innerHTML;
}
Regards

Re: alternate access method to content
Test with different contents and you'll understand why it isn't done that way.
Re: alternate access method to content
need to disable ProtectUrls function I think.
Re: alternate access method to content
The usage of the editor, here, is for text documents (some with table/positional formatting), with very few hyperlinks, no images and not much actual text formatting. Some times the documents can be a few hundred k in size.
Thanks for comments.
Re: alternate access method to content
commented out this part:
A=FCK.ProtectEvents(A);A=FCK.ProtectUrls(A);A=FCK.ProtectTags(A);
So as original responder said, this method is not without its problems, but it does make the getting of data at least twice as fast.