call function on using codemirror edit

i am currently experimenting a markdown text editor, i found on: uikit markdown editor

but i could not found a way to get a callback when inserting or editing.

is there anyway to call a function whenever user editing or pasting something?

I am trying to call prettyprint() whenever user edit something and the prettyprint will execute make code on the preview side prettyprinted.

right now i am using interval to execute the prettyprint and it works but i want more precise way to call it.


In addition to Marijn suggested, I would like to give a sample code for the reference:

               alert("Content Changed");

where 'editor' is the CodeMirror instance.

CodeMirror raises a "change" event whenever the document is modified. See

Need Your Help

Getting a different address from a HANDLE in C++ every time I re-compile and run the program?

c++ memory process handle

I'm trying to get the starting address of a process in C++ by getting the handle and printing its value. I tried getting the starting address of Spider Solitaire through Cheat Engine and it gives me "

How to run Eclipse Indigo on JDK 1.7 OSX

macos java-7 eclipse-indigo

With the recently OSX JDK 7 ea release from Oracle. How to run Eclipse Indigo ?