diff --git a/README.md b/README.md index 9eaf2a4..e443a37 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,7 @@ simplemde.value("This text will appear in the editor"); - **status**: If set to `false`, hide the status bar. Defaults to the array of built-in status bar items. - Optionally, you can set an array of status bar items to include, and in what order. You can even define your own custom status bar items. - **styleSelectedText**: If set to `false`, remove the `CodeMirror-selectedtext` class from selected lines. Defaults to `true`. +- **syncSideBySidePreviewScroll**: If set to `false`, disable syncing scroll in side by side mode. Defaults to `true`. - **tabSize**: If set, customize the tab size. Defaults to `2`. - **toolbar**: If set to `false`, hide the toolbar. Defaults to the [array of icons](#toolbar-icons). - **toolbarTips**: If set to `false`, disable toolbar button tips. Defaults to `true`. @@ -176,6 +177,7 @@ var simplemde = new SimpleMDE({ } }], // Another optional usage, with a custom status bar item that counts keystrokes styleSelectedText: false, + syncSideBySidePreviewScroll: false, tabSize: 4, toolbar: false, toolbarTips: false, diff --git a/src/js/simplemde.js b/src/js/simplemde.js index 72d0d8d..4c30e9c 100644 --- a/src/js/simplemde.js +++ b/src/js/simplemde.js @@ -1669,6 +1669,7 @@ SimpleMDE.prototype.createSideBySide = function() { wrapper.parentNode.insertBefore(preview, wrapper.nextSibling); } + if(this.options.syncSideBySidePreviewScroll === false) return preview; // Syncs scroll editor -> preview var cScroll = false; var pScroll = false;