You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-07-13 00:10:37 +02:00
Chore: Automatically create command index for desktop app
This commit is contained in:
143
packages/app-desktop/gui/NoteEditor/editorCommandDeclarations.ts
Normal file
143
packages/app-desktop/gui/NoteEditor/editorCommandDeclarations.ts
Normal file
@ -0,0 +1,143 @@
|
||||
import { CommandDeclaration } from '@joplin/lib/services/CommandService';
|
||||
import { _ } from '@joplin/lib/locale';
|
||||
|
||||
const declarations: CommandDeclaration[] = [
|
||||
{
|
||||
name: 'insertText',
|
||||
},
|
||||
{
|
||||
name: 'scrollToHash',
|
||||
},
|
||||
{
|
||||
name: 'textCopy',
|
||||
label: () => _('Copy'),
|
||||
role: 'copy',
|
||||
},
|
||||
{
|
||||
name: 'textCut',
|
||||
label: () => _('Cut'),
|
||||
role: 'cut',
|
||||
},
|
||||
{
|
||||
name: 'textPaste',
|
||||
label: () => _('Paste'),
|
||||
role: 'paste',
|
||||
},
|
||||
{
|
||||
name: 'textSelectAll',
|
||||
label: () => _('Select all'),
|
||||
role: 'selectAll',
|
||||
},
|
||||
{
|
||||
name: 'textBold',
|
||||
label: () => _('Bold'),
|
||||
iconName: 'icon-bold',
|
||||
},
|
||||
{
|
||||
name: 'textItalic',
|
||||
label: () => _('Italic'),
|
||||
iconName: 'icon-italic',
|
||||
},
|
||||
{
|
||||
name: 'textLink',
|
||||
label: () => _('Hyperlink'),
|
||||
iconName: 'icon-link',
|
||||
},
|
||||
{
|
||||
name: 'textCode',
|
||||
label: () => _('Code'),
|
||||
iconName: 'icon-code',
|
||||
},
|
||||
{
|
||||
name: 'attachFile',
|
||||
label: () => _('Attach file'),
|
||||
iconName: 'icon-attachment',
|
||||
},
|
||||
{
|
||||
name: 'textNumberedList',
|
||||
label: () => _('Numbered List'),
|
||||
iconName: 'icon-numbered-list',
|
||||
},
|
||||
{
|
||||
name: 'textBulletedList',
|
||||
label: () => _('Bulleted List'),
|
||||
iconName: 'icon-bulleted-list',
|
||||
},
|
||||
{
|
||||
name: 'textCheckbox',
|
||||
label: () => _('Checkbox'),
|
||||
iconName: 'icon-to-do-list',
|
||||
},
|
||||
{
|
||||
name: 'textHeading',
|
||||
label: () => _('Heading'),
|
||||
iconName: 'icon-heading',
|
||||
},
|
||||
{
|
||||
name: 'textHorizontalRule',
|
||||
label: () => _('Horizontal Rule'),
|
||||
iconName: 'fas fa-ellipsis-h',
|
||||
},
|
||||
{
|
||||
name: 'insertDateTime',
|
||||
label: () => _('Insert Date Time'),
|
||||
iconName: 'icon-add-date',
|
||||
},
|
||||
{
|
||||
name: 'editor.deleteLine',
|
||||
label: () => _('Delete line'),
|
||||
},
|
||||
{
|
||||
name: 'editor.duplicateLine',
|
||||
label: () => _('Duplicate line'),
|
||||
},
|
||||
{
|
||||
name: 'editor.undo',
|
||||
label: () => _('Undo'),
|
||||
},
|
||||
{
|
||||
name: 'editor.redo',
|
||||
label: () => _('Redo'),
|
||||
},
|
||||
{
|
||||
name: 'editor.indentLess',
|
||||
label: () => _('Indent less'),
|
||||
},
|
||||
{
|
||||
name: 'editor.indentMore',
|
||||
label: () => _('Indent more'),
|
||||
},
|
||||
{
|
||||
name: 'editor.toggleComment',
|
||||
label: () => _('Toggle comment'),
|
||||
},
|
||||
{
|
||||
name: 'editor.sortSelectedLines',
|
||||
label: () => _('Sort selected lines'),
|
||||
},
|
||||
{
|
||||
name: 'editor.swapLineUp',
|
||||
label: () => _('Swap line up'),
|
||||
},
|
||||
{
|
||||
name: 'editor.swapLineDown',
|
||||
label: () => _('Swap line down'),
|
||||
},
|
||||
{
|
||||
name: 'selectedText',
|
||||
},
|
||||
{
|
||||
name: 'replaceSelection',
|
||||
},
|
||||
{
|
||||
name: 'editor.setText',
|
||||
},
|
||||
{
|
||||
name: 'editor.focus',
|
||||
},
|
||||
{
|
||||
name: 'editor.execCommand',
|
||||
},
|
||||
];
|
||||
|
||||
export default declarations;
|
Reference in New Issue
Block a user