fix: refresh codemirror in next event loop

Fix issue #68
Closes #76