Active deactive events

Add active/deactive events to editor.