Replace range directly in CodeMirror instance insted of using the docunent.
Merge pull request #2784 from adobe/rlim/css-insertion-issue

Replace range directly in CodeMirror instance insted of using the document.