refactor text viewer to use CodeMirror
core-4249 refactor code and add nexus syntax