diff --git a/packages/@sanity/vision/src/codemirror/extensions.ts b/packages/@sanity/vision/src/codemirror/extensions.ts index 7cb17b2876b2..12f142bdacdd 100644 --- a/packages/@sanity/vision/src/codemirror/extensions.ts +++ b/packages/@sanity/vision/src/codemirror/extensions.ts @@ -8,7 +8,7 @@ import { syntaxHighlighting, } from '@codemirror/language' import {highlightSelectionMatches} from '@codemirror/search' -import {Extension} from '@codemirror/state' +import {type Extension} from '@codemirror/state' import { drawSelection, highlightActiveLine, @@ -31,5 +31,7 @@ export const codemirrorExtensions: Extension[] = [ history(), drawSelection(), syntaxHighlighting(defaultHighlightStyle, {fallback: true}), - keymap.of([defaultKeymap, historyKeymap].flat().filter(Boolean)), + keymap.of( + [{key: 'Mod-Enter', run: () => true}, defaultKeymap, historyKeymap].flat().filter(Boolean), + ), ]