diff --git a/packages/app-mobile/components/EditorToolbar/utils/allToolbarCommandNamesFromState.ts b/packages/app-mobile/components/EditorToolbar/utils/allToolbarCommandNamesFromState.ts index e6b0d8806f..e0a78c80c3 100644 --- a/packages/app-mobile/components/EditorToolbar/utils/allToolbarCommandNamesFromState.ts +++ b/packages/app-mobile/components/EditorToolbar/utils/allToolbarCommandNamesFromState.ts @@ -22,6 +22,8 @@ const builtInCommandNames = [ '-', EditorCommandType.IndentLess, EditorCommandType.IndentMore, + `editor.${EditorCommandType.SwapLineDown}`, + `editor.${EditorCommandType.SwapLineUp}`, '-', 'insertDateTime', '-', diff --git a/packages/app-mobile/components/EditorToolbar/utils/selectedCommandNamesFromState.ts b/packages/app-mobile/components/EditorToolbar/utils/selectedCommandNamesFromState.ts index c4a3ec67e1..f955f0c345 100644 --- a/packages/app-mobile/components/EditorToolbar/utils/selectedCommandNamesFromState.ts +++ b/packages/app-mobile/components/EditorToolbar/utils/selectedCommandNamesFromState.ts @@ -1,3 +1,4 @@ +import { EditorCommandType } from '@joplin/editor/types'; import { AppState } from '../../../utils/types'; import allToolbarCommandNamesFromState from './allToolbarCommandNamesFromState'; import { Platform } from 'react-native'; @@ -7,6 +8,8 @@ const omitFromDefault: string[] = [ 'editor.textHeading3', 'editor.textHeading4', 'editor.textHeading5', + `editor.${EditorCommandType.SwapLineDown}`, + `editor.${EditorCommandType.SwapLineUp}`, ]; // The "hide keyboard" button is only needed on iOS, so only show it there by default. diff --git a/packages/app-mobile/components/NoteEditor/commandDeclarations.ts b/packages/app-mobile/components/NoteEditor/commandDeclarations.ts index 5ea3b46d38..470ce195e4 100644 --- a/packages/app-mobile/components/NoteEditor/commandDeclarations.ts +++ b/packages/app-mobile/components/NoteEditor/commandDeclarations.ts @@ -97,6 +97,16 @@ const declarations: CommandDeclaration[] = [ label: () => _('Increase indent level'), iconName: 'ant indent-right', }, + { + name: `editor.${EditorCommandType.SwapLineDown}`, + label: () => _('Swap line down'), + iconName: 'material chevron-double-down', + }, + { + name: `editor.${EditorCommandType.SwapLineUp}`, + label: () => _('Swap line up'), + iconName: 'material chevron-double-up', + }, { name: EditorCommandType.ToggleSearch, label: () => _('Search'),