Fix a bug that can cause exception in nodeChange from the submit event

Add exception handler around `editor.nodeChanged()`
Merge pull request #1 from ssut/codemirror-fix

Fix a bug that can cause exception in nodeChange from the submit event