1
0
mirror of synced 2025-12-08 15:04:16 +08:00

feat(#220): Exposes Mergely's instance of CodeMirror as Mergely.CodeMirror (#221)

This commit is contained in:
Jamie Peabody
2025-11-15 15:42:29 +00:00
committed by GitHub
parent b9aed167f3
commit d6d8d06acc
2 changed files with 7 additions and 3 deletions

View File

@@ -18,9 +18,11 @@ function CodeMirrorDiffView(el, options) {
const coords = this.cursorCoords(null, 'local');
this.scrollTo(null,
(coords.top + coords.bottom) / 2 - (this.getScrollerElement().clientHeight / 2));
});
this.init(el, options);
};
});
this.init(el, options);
};
CodeMirrorDiffView.CodeMirror = CodeMirror;
const trace = console.log;
const traceTimeStart = console.time;

View File

@@ -253,6 +253,8 @@ class Mergely {
}
}
Mergely.CodeMirror = CodeMirrorDiffView.CodeMirror;
window.Mergely = Mergely;
module.exports = Mergely;