Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update innerHTML of source textarea on blur #4

Open
jabbett opened this issue Jan 8, 2012 · 1 comment
Open

Update innerHTML of source textarea on blur #4

jabbett opened this issue Jan 8, 2012 · 1 comment

Comments

@jabbett
Copy link

jabbett commented Jan 8, 2012

I use jQuery to run a method whenever an input in my form changes, i.e.

$("textarea").live("change", function() {
// do something
});

I have PunyMCE enabled for a textarea, but the textarea's innerHTML never changes when I edit the text, so my change function never runs.

Does PunyMCE has its own way of defining a change event? Perhaps someone could provide a code snippet? Thanks!

@adg29
Copy link

adg29 commented Apr 13, 2012

I looked through the source and found a few events that are dispatched by the editor. Seems to me that the onNodeChange event is what you are looking for.

  editor1.onNodeChange.add(function(){
    var content = editor1.getContent({save : true});
    console.log('new value :'+content);
  });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants