ArteJS raises a rich collection of events to interact with the editor.
// Listening to events$(selector).on('eventname',function(e,data){...});// Another way to listen to eventseditorInstance.on('eventname',function(e,data){...});
Events raised by the editor:
onfocus – editor gained focus
onblur – editor lost focus
onvaluechange – rich text value changed
onmousedown – mouse down over the editor
onmouseup – mouse up over the editor
onclick – mouse clicked over the editor
onkeydown – key down over the editor
onkeypress – key press over the editor
onkeyup – key up over the editor
onpaste – content pasted into the editor
onselectionchange – editor text selection changed
onbeforecommand – fired before a command is executed
oncommand – fired after a command has been executed