Allow to disable syncing scroll in side-by-side mode via options

patch-ionaru
Tsubasa 7 years ago
parent b9071f0c91
commit 775e448518

@ -110,6 +110,7 @@ simplemde.value("This text will appear in the editor");
- **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`.
- **syncPreviewSideScroll**: If set to `false`, disable syncing scroll in side by side mode. Defaults to `true`.
```JavaScript
// Most options demonstrate the non-default behavior

File diff suppressed because one or more lines are too long

@ -1667,6 +1667,7 @@ SimpleMDE.prototype.createSideBySide = function() {
wrapper.parentNode.insertBefore(preview, wrapper.nextSibling);
}
if(this.options.syncPreviewSideScroll === false) return preview;
// Syncs scroll editor -> preview
var cScroll = false;
var pScroll = false;

Loading…
Cancel
Save