diff --git a/src/diff-view.js b/src/diff-view.js index 94a24ee..82fdff4 100644 --- a/src/diff-view.js +++ b/src/diff-view.js @@ -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; diff --git a/src/mergely.js b/src/mergely.js index 44a1ed6..16bea09 100644 --- a/src/mergely.js +++ b/src/mergely.js @@ -253,6 +253,8 @@ class Mergely { } } +Mergely.CodeMirror = CodeMirrorDiffView.CodeMirror; + window.Mergely = Mergely; module.exports = Mergely;