views:

98

answers:

2

Hello, I'm currently using the Rich Text Editor from the YUI framework. But I don't know how I can run a function when the content of the editor has changed. Want to do this to give the user a message if they leave the site and there is unsaved changes.

Any idea anyone? :)

+1  A: 

I think you want the 'afterNodeChange' event.

Study the API for the Events. It is there that you will find the answers that you seek :-)

firecall
Really don't understand to much about the yui docs, but think i solved it some kind of an ugly way with jQuery.
Terw
A: 

Can you share how you did this? I have the same question. However, afterNodeChange doesn't work because that event gets fired immediately when the editor is loaded and you don't want to flag the editor as dirty right away. I can't believe this control doesn't have an onchange event.

Mike