mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-08-22 16:42:44 -06: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`.
|
- **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).
|
- **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`.
|
- **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
|
```JavaScript
|
||||||
// Most options demonstrate the non-default behavior
|
// 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);
|
wrapper.parentNode.insertBefore(preview, wrapper.nextSibling);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(this.options.syncPreviewSideScroll === false) return preview;
|
||||||
// Syncs scroll editor -> preview
|
// Syncs scroll editor -> preview
|
||||||
var cScroll = false;
|
var cScroll = false;
|
||||||
var pScroll = false;
|
var pScroll = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user