mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-12 01:23:52 +00:00
add Select All to editor context menu
This commit is contained in:
@@ -158,6 +158,12 @@ class Editor extends React.Component<EditorProps> {
|
||||
icon="clipboard"
|
||||
label={isMacOS() ? 'Cmd-V' : 'Ctrl-V'}
|
||||
/>
|
||||
<MenuItem
|
||||
onClick={() => this.editor?.selectAll()}
|
||||
text={i18n.translate(EditorStringId.SelectAll)}
|
||||
icon="blank"
|
||||
label={isMacOS() ? 'Cmd-A' : 'Ctrl-A'}
|
||||
/>
|
||||
<MenuDivider />
|
||||
<MenuItem
|
||||
onClick={(): void => this.editor?.undo()}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
"placeholder": "Write your program here...",
|
||||
"copy": "Copy",
|
||||
"paste": "Paste",
|
||||
"selectAll": "Select All",
|
||||
"undo": "Undo",
|
||||
"redo": "Redo"
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ export enum EditorStringId {
|
||||
Placeholder = 'editor.placeholder',
|
||||
Copy = 'editor.copy',
|
||||
Paste = 'editor.paste',
|
||||
SelectAll = 'editor.selectAll',
|
||||
Undo = 'editor.undo',
|
||||
Redo = 'editor.redo',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user