You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-26 22:41:17 +02:00
Mobile: Add "swap line up" and "swap line down" to toolbar extended options (#12053)
This commit is contained in:
@@ -22,6 +22,8 @@ const builtInCommandNames = [
|
||||
'-',
|
||||
EditorCommandType.IndentLess,
|
||||
EditorCommandType.IndentMore,
|
||||
`editor.${EditorCommandType.SwapLineDown}`,
|
||||
`editor.${EditorCommandType.SwapLineUp}`,
|
||||
'-',
|
||||
'insertDateTime',
|
||||
'-',
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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'),
|
||||
|
||||
Reference in New Issue
Block a user