#900 closed New Feature (wontfix)
onChange event
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | |
Keywords: | SF Confirmed | Cc: | Alfonso Martínez de Lizarrondo, rotty@… |
Description (last modified by )
Is it possible to detect an onChange event of the FCKeditor?
In a TEXTAREA it is possible to place an onChange event; but after substituting to it the appropriate statements for FCKeditor
$oFCKeditor = new FCKeditor('...') ;
and so on it seems that there is no way to detect a change performed by editing. FCKeditor installs in HTML three stetements, two of them <INPUT HIDDEN ....> and one <IFRAME ...> but it seems that none of the three can be checked for change of rhe value.
Do you know any way to detect a change?
Moved from SF:
http://sourceforge.net/tracker/index.php?func=detail&aid=1497731&group_id=75348&atid=543656
Change History (13)
comment:1 Changed 18 years ago by
Cc: | Alfonso Martínez de Lizarrondo rotty@… added |
---|---|
Reporter: | changed from Martin Kou to kalanag@… |
comment:2 Changed 18 years ago by
Description: | modified (diff) |
---|
comment:3 Changed 18 years ago by
Description: | modified (diff) |
---|
comment:4 Changed 16 years ago by
Keywords: | Confirmed added |
---|---|
Summary: | is it possible to detect an onChange event of the FCKeditor? → onChange event |
comment:5 Changed 16 years ago by
Will this be included in a upcomming version of fckeditor ?
We need a way to detect changes in the content for the integration with echo3 framework.
Currently we just poll every 250ms for changes, but this is not the way it should be.
comment:6 Changed 15 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
We're not able to provide a single change event because it's very difficult to guanrantee that it will be fired for every single action. It is supposed to be a feature that "almost works" in this way.
My recommendation here is creating a plugin that doesn the job of watching for all ncessary events that generate changes, firing the change event in those cases.
comment:8 Changed 15 years ago by
I miss this feature also.
On "Many Events": A textarea-onchange or an inputfield-onchange ist thrown, when the user leaves the textarea/inputfield.
That would be enough. No need for events on every single action.
comment:9 Changed 12 years ago by
This would be a very nice feature to have. Without it, integrating CKeditor into a more complex framework such as backbone or ember is a pain and a complete waste of time. It seems as though TinyMCE has a callback function for change events. Personally, I don't think "it's hard to guarantee the event will be fired" is a good excuse. Indeed, the fact that it's hard has not stopped other people from at least attempting some sort of implementation through plugins. That said, firing publicly accessible change events (among others) is a core feature of most great javascript libraries and I'm a bit amazed that CKEditor devs aren't even going to give it a shot.
comment:10 Changed 12 years ago by
This is available in our Add-Ons forum as a plugin: http://cksource.com/forums/viewtopic.php?f=18&t=23605
There has even been autosave plugin created based on the first plugin: http://cksource.com/forums/viewtopic.php?f=18&t=24128
comment:11 Changed 12 years ago by
That's great. Thank you for the links.
Is there any chance of that functionality being incorporated into the core?
You can use the IsDirty() function to check if the content has changed since last time was reset http://wiki.fckeditor.net/Developer%27s_Guide/Javascript_API And you can try to use an event listener to OnSelectionChange but use it carefully as it can be fired quite often and the IsDirty checks the innerHTML of the frame so you might find problems if the content is too large (just depends on what you call large)
Moved from SF. Original poster: alfonsoml
This would be very helpful, as we often have many instances on a page which conprise the individual elements of an article.
We'd need to be able to detect events so that we can prompt for a "Save Changes".
Moved from SF. Original poster: rotty