From a0ad1eb30188254d920d93dfac407e434f861e5b Mon Sep 17 00:00:00 2001 From: Komediruzecki Date: Sun, 29 Aug 2021 14:34:48 +0200 Subject: [PATCH] Add scroll past end Add scroll past end editor config (mobile and web/desktop) Add scroll past end addon --- src/cloud/components/Editor/index.tsx | 1 + src/cloud/lib/editor/CodeMirror.ts | 1 + src/mobile/components/pages/DocEditPage.tsx | 1 + 3 files changed, 3 insertions(+) diff --git a/src/cloud/components/Editor/index.tsx b/src/cloud/components/Editor/index.tsx index 8307726062..fa81b2d169 100644 --- a/src/cloud/components/Editor/index.tsx +++ b/src/cloud/components/Editor/index.tsx @@ -252,6 +252,7 @@ const Editor = ({ Enter: 'newlineAndIndentContinueMarkdownList', Tab: 'indentMore', }, + scrollPastEnd: true, } }, [settings]) diff --git a/src/cloud/lib/editor/CodeMirror.ts b/src/cloud/lib/editor/CodeMirror.ts index 28c3b779d2..ecea622846 100644 --- a/src/cloud/lib/editor/CodeMirror.ts +++ b/src/cloud/lib/editor/CodeMirror.ts @@ -8,6 +8,7 @@ import 'codemirror/keymap/vim' import 'codemirror/addon/hint/show-hint' import 'codemirror/keymap/sublime' import 'codemirror/keymap/emacs' +import 'codemirror/addon/scroll/scrollpastend' import { loadMode } from '../../../design/lib/codemirror/util' loadMode(CodeMirror) diff --git a/src/mobile/components/pages/DocEditPage.tsx b/src/mobile/components/pages/DocEditPage.tsx index 8b498f4ef4..b50b98b005 100644 --- a/src/mobile/components/pages/DocEditPage.tsx +++ b/src/mobile/components/pages/DocEditPage.tsx @@ -352,6 +352,7 @@ const Editor = ({ doc, team, user, contributors, backLinks }: EditorProps) => { Enter: 'newlineAndIndentContinueMarkdownList', Tab: 'indentMore', }, + scrollPastEnd: true, } }, [settings])