mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Upgrade CodeMirror
closes #2108 - upgrade to 4.0.1 - requires removing the deprecated setLine method
This commit is contained in:
parent
665bacf4c6
commit
c0c5058eea
1 changed files with 9 additions and 2 deletions
|
@ -45,8 +45,15 @@
|
||||||
// ln - line number
|
// ln - line number
|
||||||
addMarker = function (line, ln) {
|
addMarker = function (line, ln) {
|
||||||
var marker,
|
var marker,
|
||||||
magicId = '{<' + uploadId + '>}';
|
magicId = '{<' + uploadId + '>}',
|
||||||
editor.setLine(ln, magicId + line.text);
|
newText = magicId + line.text;
|
||||||
|
|
||||||
|
editor.replaceRange(
|
||||||
|
newText,
|
||||||
|
{line: ln, ch: 0},
|
||||||
|
{line: ln, ch: newText.length}
|
||||||
|
);
|
||||||
|
|
||||||
marker = editor.markText(
|
marker = editor.markText(
|
||||||
{line: ln, ch: 0},
|
{line: ln, ch: 0},
|
||||||
{line: ln, ch: (magicId.length)},
|
{line: ln, ch: (magicId.length)},
|
||||||
|
|
Loading…
Add table
Reference in a new issue