Upgrade CodeMirror

closes #2108

- upgrade to 4.0.1
- requires removing the deprecated setLine method
This commit is contained in:
Hannah Wolfe 2014-03-16 12:28:12 +00:00
parent 665bacf4c6
commit c0c5058eea

View File

@ -45,8 +45,15 @@
// ln - line number
addMarker = function (line, ln) {
var marker,
magicId = '{<' + uploadId + '>}';
editor.setLine(ln, magicId + line.text);
magicId = '{<' + uploadId + '>}',
newText = magicId + line.text;
editor.replaceRange(
newText,
{line: ln, ch: 0},
{line: ln, ch: newText.length}
);
marker = editor.markText(
{line: ln, ch: 0},
{line: ln, ch: (magicId.length)},