I'd like to make the fckeditor give a warning when it is closed without saving. Many common applications do this e.g. open office / word and I noticed recently that google mail was doing it too. This is a helpfull feature if the editor is being used to write long / important documents, especially if the browser if shut down accidentally for some reason.
I am experimenting with the javascript onBeforeUpdate event, which works well. However - currently it fires when the page is saved as well as when the page is closed or refreshed, which is not desired.
Do you think this is the right approach? Has anyone else tried this?
PS: I guess that I need to disable the dialogue when the form is saved using the doSave action:
http://wiki.fckeditor.net/Developer%27s ... =%28dosave%
Is it possible to attach to this event from a plugin?
Tue, 05/29/2007 - 02:59
#1
RE: Catching close without save / onBeforeUpd
I'll answer my own question - yes it is possible to do this from anywhere that you can access the FCK object:
> FCK.LinkedField.form.onsubmit = myFunction;
See it working: http://sourceforge.net/tracker/index.ph ... tid=737639