There are 195 pages of topics here so sorry in advance if this question was already asked.
I have to integrate FCKEditor in an existing ASP page. My main problem is I can't use (for example) Request.Form("FCKEditor1") after the submit. The existing page is doing some work in javascript before submitting the form. Most of the time, the editor will receive content text on startup (when creating the editor in ASP, something like editorInstance.Value = some_text)
My problem is when I try to access this content in a javascript:
var editor = document.getElementById("FCKEditor1");
editor.value always shows the original text (some_text) but anything that's been changed in that text in the editor is nowhere to be found. I don't really care about the original text since it's already in a DB. What I need is the edited text or, in other words, the text you can see when you look at the page, not the one you gave to the editor when creating it.
Anyone knows how to get it from javascript?
I have to integrate FCKEditor in an existing ASP page. My main problem is I can't use (for example) Request.Form("FCKEditor1") after the submit. The existing page is doing some work in javascript before submitting the form. Most of the time, the editor will receive content text on startup (when creating the editor in ASP, something like editorInstance.Value = some_text)
My problem is when I try to access this content in a javascript:
var editor = document.getElementById("FCKEditor1");
editor.value always shows the original text (some_text) but anything that's been changed in that text in the editor is nowhere to be found. I don't really care about the original text since it's already in a DB. What I need is the edited text or, in other words, the text you can see when you look at the page, not the one you gave to the editor when creating it.
Anyone knows how to get it from javascript?
Re: Stuck with original content. Can't find edited content.
Re: Stuck with original content. Can't find edited content.
Seems to be the right idea. However, the call to GetXHTML() fails with ('undefined is null or not an object). I've checked (not even sure if this is relevant) and both FCKConfig.EnableXHTML and FCKConfig.EnableSourceXHTML are set to true. Also, the GetXHTML function seems to belong to FCKXHTML class. Not sure how it is related to FCKEditor as I have not an extensive knowledge of those classes... By the way, it seems the version of the editor on the server i'm working on is not the latest... might be why I have not access to GetXHTML from an instance of FCKEditor. Any idea?
Re: Stuck with original content. Can't find edited content.
ok! Forget about what I wrote. I tried copy/paste the editor instance name just to make sure and it worked... Guess that was the problem from the start. Calling GetXHTML from null is not exactly the best thing you can do. Problem solved! Thank you very much!