1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-08-10 22:11:50 +02:00

Mobile: Add delete line, duplicate line and sort selected lines buttons to editor toolbar (#12555)

This commit is contained in:
mrjo118
2025-06-28 21:01:05 +01:00
committed by GitHub
parent 1f9f63d176
commit f9ccd15615
3 changed files with 21 additions and 0 deletions

View File

@@ -24,6 +24,9 @@ const builtInCommandNames = [
EditorCommandType.IndentMore, EditorCommandType.IndentMore,
`editor.${EditorCommandType.SwapLineDown}`, `editor.${EditorCommandType.SwapLineDown}`,
`editor.${EditorCommandType.SwapLineUp}`, `editor.${EditorCommandType.SwapLineUp}`,
`editor.${EditorCommandType.DeleteLine}`,
`editor.${EditorCommandType.DuplicateLine}`,
`editor.${EditorCommandType.SortSelectedLines}`,
'-', '-',
'insertDateTime', 'insertDateTime',
'-', '-',

View File

@@ -10,6 +10,9 @@ const omitFromDefault: string[] = [
'editor.textHeading5', 'editor.textHeading5',
`editor.${EditorCommandType.SwapLineDown}`, `editor.${EditorCommandType.SwapLineDown}`,
`editor.${EditorCommandType.SwapLineUp}`, `editor.${EditorCommandType.SwapLineUp}`,
`editor.${EditorCommandType.DeleteLine}`,
`editor.${EditorCommandType.DuplicateLine}`,
`editor.${EditorCommandType.SortSelectedLines}`,
]; ];
// The "hide keyboard" button is only needed on iOS, so only show it there by default. // The "hide keyboard" button is only needed on iOS, so only show it there by default.

View File

@@ -107,6 +107,21 @@ const declarations: CommandDeclaration[] = [
label: () => _('Swap line up'), label: () => _('Swap line up'),
iconName: 'material chevron-double-up', iconName: 'material chevron-double-up',
}, },
{
name: `editor.${EditorCommandType.DeleteLine}`,
label: () => _('Delete line'),
iconName: 'material close',
},
{
name: `editor.${EditorCommandType.DuplicateLine}`,
label: () => _('Duplicate line'),
iconName: 'material content-duplicate',
},
{
name: `editor.${EditorCommandType.SortSelectedLines}`,
label: () => _('Sort selected lines'),
iconName: 'material sort-alphabetical-ascending',
},
{ {
name: EditorCommandType.ToggleSearch, name: EditorCommandType.ToggleSearch,
label: () => _('Search'), label: () => _('Search'),