From 997e50f0cdf6be491a51eba20e7e585a6c785ab5 Mon Sep 17 00:00:00 2001 From: Nishthajain7 Date: Sun, 22 Feb 2026 14:55:00 +0530 Subject: [PATCH] fix:Emmet expands abbrevations when text is pasted --- client/modules/IDE/components/Editor/stateUtils.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/client/modules/IDE/components/Editor/stateUtils.js b/client/modules/IDE/components/Editor/stateUtils.js index e3a90e813a..2eb497c2c7 100644 --- a/client/modules/IDE/components/Editor/stateUtils.js +++ b/client/modules/IDE/components/Editor/stateUtils.js @@ -359,6 +359,15 @@ export function createNewFileState(filename, document, settings) { if (fileEmmetConfig) { extensions.push(fileEmmetConfig); extensions.push(abbreviationTracker()); + extensions.push( + EditorView.domEventHandlers({ + paste(event, view) { + setTimeout(() => { + expandAbbreviation(view); + }, 0); + } + }) + ); keymaps.push(emmetKeymaps); }