mirror of
https://github.com/sparksuite/simplemde-markdown-editor.git
synced 2024-06-09 01:12:14 +02:00
Allow to disable syncing scroll in side-by-side mode via options
This commit is contained in:
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
|
||||
|
|
18
dist/simplemde.min.js
vendored
18
dist/simplemde.min.js
vendored
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…
Reference in a new issue