From eabb23fd3e93313fe247a258bf4387020a7e6551 Mon Sep 17 00:00:00 2001 From: Daniel Calbet Date: Fri, 2 Oct 2020 09:25:13 +0000 Subject: [PATCH 1/4] using scrollbarStyle option --- src/js/easymde.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/js/easymde.js b/src/js/easymde.js index a99e29d..17fb671 100644 --- a/src/js/easymde.js +++ b/src/js/easymde.js @@ -2040,6 +2040,7 @@ EasyMDE.prototype.render = function (el) { allowDropFileTypes: ['text/plain'], placeholder: options.placeholder || el.getAttribute('placeholder') || '', styleSelectedText: (options.styleSelectedText != undefined) ? options.styleSelectedText : !isMobile(), + scrollbarStyle: options.scrollbarStyle, configureMouse: configureMouse, inputStyle: (options.inputStyle != undefined) ? options.inputStyle : isMobile() ? 'contenteditable' : 'textarea', spellcheck: (options.nativeSpellcheck != undefined) ? options.nativeSpellcheck : true, From 3517348ef77ac5454d617f9f85bd6f03278958ce Mon Sep 17 00:00:00 2001 From: Daniel Calbet Date: Sun, 4 Oct 2020 06:38:01 +0000 Subject: [PATCH 2/4] scrollbar style in options type --- types/easymde.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/easymde.d.ts b/types/easymde.d.ts index d8ba0be..e4fa9c1 100644 --- a/types/easymde.d.ts +++ b/types/easymde.d.ts @@ -198,6 +198,7 @@ declare namespace EasyMDE { toolbarTips?: boolean; onToggleFullScreen?: (goingIntoFullScreen: boolean) => void; theme?: string; + scrollbarStyle?: string; uploadImage?: boolean; imageMaxSize?: number; From c696922fe19017e7cc315ec3c8ea0fb021a5c3eb Mon Sep 17 00:00:00 2001 From: Daniel Calbet Date: Sun, 4 Oct 2020 06:55:35 +0000 Subject: [PATCH 3/4] changelog: include new scrollbarStyle option --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index c713992..36da39c 100644 --- a/README.md +++ b/README.md @@ -130,6 +130,7 @@ easyMDE.value('New input for **EasyMDE**'); - **bold**: Can be set to `**` or `__`. Defaults to `**`. - **code**: Can be set to ```` ``` ```` or `~~~`. Defaults to ```` ``` ````. - **italic**: Can be set to `*` or `_`. Defaults to `*`. +- **scrollbarStyle**: Chooses a scrollbar implementation. The default is "native", showing native scrollbars. The core library also provides the "null" style, which completely hides the scrollbars. Addons can implement additional scrollbar models. - **element**: The DOM element for the TextArea to use. Defaults to the first TextArea on the page. - **forceSync**: If set to `true`, force text changes made in EasyMDE to be immediately stored in original text area. Defaults to `false`. - **hideIcons**: An array of icon names to hide. Can be used to hide specific icons shown by default without completely customizing the toolbar. From 29d2c6c5be67c8db726adca982c6848c876f154f Mon Sep 17 00:00:00 2001 From: dani Date: Sun, 11 Oct 2020 08:44:20 +0200 Subject: [PATCH 4/4] fix for undefined scrollbar style --- src/js/easymde.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/easymde.js b/src/js/easymde.js index 17fb671..d7f117e 100644 --- a/src/js/easymde.js +++ b/src/js/easymde.js @@ -2040,7 +2040,7 @@ EasyMDE.prototype.render = function (el) { allowDropFileTypes: ['text/plain'], placeholder: options.placeholder || el.getAttribute('placeholder') || '', styleSelectedText: (options.styleSelectedText != undefined) ? options.styleSelectedText : !isMobile(), - scrollbarStyle: options.scrollbarStyle, + scrollbarStyle: (options.scrollbarStyle != undefined) ? options.scrollbarStyle : 'native', configureMouse: configureMouse, inputStyle: (options.inputStyle != undefined) ? options.inputStyle : isMobile() ? 'contenteditable' : 'textarea', spellcheck: (options.nativeSpellcheck != undefined) ? options.nativeSpellcheck : true,