mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 11:01:15 +00:00
fix(editor): Enable explicit undo keyboard shortcut across all code editors (#8178)
Fixes [ADO-801](https://linear.app/n8n/issue/ADO-801), [PAY-632](https://linear.app/n8n/issue/PAY-632), and [PAY-730](https://linear.app/n8n/issue/PAY-730) Also fixes #5297 ## Review / Merge checklist - [x] PR title and summary are descriptive
This commit is contained in:
committed by
GitHub
parent
e418d42450
commit
cf7f6688ba
@@ -8,7 +8,7 @@ import type { PropType } from 'vue';
|
||||
import { mapStores } from 'pinia';
|
||||
import { EditorView, keymap } from '@codemirror/view';
|
||||
import { Compartment, EditorState, Prec } from '@codemirror/state';
|
||||
import { history, redo } from '@codemirror/commands';
|
||||
import { history, redo, undo } from '@codemirror/commands';
|
||||
import { acceptCompletion, autocompletion, completionStatus } from '@codemirror/autocomplete';
|
||||
|
||||
import { useNDVStore } from '@/stores/ndv.store';
|
||||
@@ -29,6 +29,7 @@ export default defineComponent({
|
||||
props: {
|
||||
modelValue: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
isReadOnly: {
|
||||
type: Boolean,
|
||||
@@ -40,6 +41,7 @@ export default defineComponent({
|
||||
},
|
||||
path: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
additionalData: {
|
||||
type: Object as PropType<IDataObject>,
|
||||
@@ -103,6 +105,7 @@ export default defineComponent({
|
||||
return false;
|
||||
},
|
||||
},
|
||||
{ key: 'Mod-z', run: undo },
|
||||
{ key: 'Mod-Shift-z', run: redo },
|
||||
]),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user