From f5ef318f702fc726d254459f62b637af6b8f4beb Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Tue, 3 Jan 2023 19:48:33 +0000 Subject: [PATCH] Mobile: Make the new text editor the default one --- packages/app-mobile/components/screens/Note.tsx | 2 +- packages/lib/models/Setting.ts | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/packages/app-mobile/components/screens/Note.tsx b/packages/app-mobile/components/screens/Note.tsx index 20ac67ddc..ec93d6d22 100644 --- a/packages/app-mobile/components/screens/Note.tsx +++ b/packages/app-mobile/components/screens/Note.tsx @@ -1242,7 +1242,7 @@ const NoteScreen = connect((state: any) => { showSideMenu: state.showSideMenu, provisionalNoteIds: state.provisionalNoteIds, highlightedWords: state.highlightedWords, - useEditorBeta: state.settings['editor.beta'], + useEditorBeta: !state.settings['editor.usePlainText'], }; })(NoteScreenComponent); diff --git a/packages/lib/models/Setting.ts b/packages/lib/models/Setting.ts index 7e26263c6..389f9602d 100644 --- a/packages/lib/models/Setting.ts +++ b/packages/lib/models/Setting.ts @@ -1018,7 +1018,7 @@ class Setting extends BaseModel { value: false, type: SettingItemType.Bool, section: 'note', - public: true, + public: false, appTypes: [AppType.Mobile], label: () => 'Opt-in to the editor beta', description: () => 'This beta adds list continuation and syntax highlighting. If you find bugs, please report them in the Discourse forum.', @@ -1026,6 +1026,18 @@ class Setting extends BaseModel { isGlobal: true, }, + 'editor.usePlainText': { + value: false, + type: SettingItemType.Bool, + section: 'note', + public: true, + appTypes: [AppType.Mobile], + label: () => 'Use the plain text editor', + description: () => 'The plain text editor has various issues and is no longer supported. If you are having issues with the new editor however you can revert to the old one using this setting.', + storage: SettingStorage.File, + isGlobal: true, + }, + // Enables/disables spellcheck in the mobile markdown beta editor. 'editor.mobile.spellcheckEnabled': { value: true,