From 70725fa989d9e5847ca439cc58ec69d3ddd57f31 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Sun, 5 Apr 2026 04:23:58 +0200 Subject: [PATCH] Add duplicate selection functionality in App.js --- src/app/App.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/app/App.js b/src/app/App.js index 263d6665..05019f02 100644 --- a/src/app/App.js +++ b/src/app/App.js @@ -2115,6 +2115,20 @@ export function App({ store, initialStatusMessage }) { } return false; }; + const handleDuplicateSelection = () => { + if (!selectionCanBeDuplicated(editorState.selection)) { + return false; + } + try { + store.executeCommand(createDuplicateSelectionCommand()); + setStatusMessage("Duplicated selection."); + return true; + } + catch (error) { + setStatusMessage(getErrorMessage(error)); + return false; + } + }; const updateInteractionLinkTrigger = (link, trigger) => { const sourceEntity = getInteractionSourceEntityForLink(link); if (sourceEntity?.kind === "interactable" && trigger !== "click") {