I'm using FCKeditor built into Coldfusion 8. My code is calling the editor like this:
I need to be able to detect whether the user has made changes in the editor and prompt them to save changes if navigating away from the page. I have looked at the documentation, including the JS API containing the isDirty method, but I can't figure out how to get the API to interact with the editor called this way. I CAN get the FCKeditor_OnComplete event to give me the editor instance name (see below), but I can't figure out how to proceed from here.
Has anyone done this using CF8?
<cftextarea name="mycontent" id="mycontent" richtext="true" skin="silvernarrow" toolbar="Main">#pagecontent#</cftextarea>
I need to be able to detect whether the user has made changes in the editor and prompt them to save changes if navigating away from the page. I have looked at the documentation, including the JS API containing the isDirty method, but I can't figure out how to get the API to interact with the editor called this way. I CAN get the FCKeditor_OnComplete event to give me the editor instance name (see below), but I can't figure out how to proceed from here.
function FCKeditor_OnComplete(editorInstance) { var instancename = editorInstance.Name; var oEditor = FCKeditorAPI.GetInstance(instancename); }
Has anyone done this using CF8?
Re: Prompt Save Changes using isDirty with CF8 cftextarea
editorInstance is already an instance of FCKeditor, you won't get anything extra by getting it again.
For the rest of the question, search about onbeforeunload
Re: Prompt Save Changes using isDirty with CF8 cftextarea
Re: Prompt Save Changes using isDirty with CF8 cftextarea
Thanks