Preflight Checklist
Describe the bug
Ctrl+Shift+V / Cmd+Shift+V (Paste without formatting) shortcut does not work in draw.io Desktop. The
draw.io web editor in the renderer process intercepts the keyboard event before Electron's menu
accelerator (pasteAndMatchStyle role) can handle it. On Windows/Linux, the application menu is set to
null, so the shortcut is never registered at all.
To Reproduce
- Copy formatted text from a browser or Word document
- Open draw.io Desktop
- Double-click a shape to enter text editing mode
- Press Ctrl+Shift+V (Windows/Linux) or Cmd+Shift+V (macOS)
- Text is pasted with formatting intact, or nothing happens
Expected behavior
Text should be pasted as plain text without formatting.
draw.io version:
29.6.6
Desktop:
- OS: Windows 11 / macOS
- App: draw.io Desktop (Electron)
Root cause
In src/main/electron.js, the Edit menu with { role: 'pasteAndMatchStyle' } is only created for macOS.
Even on macOS, the draw.io web editor's JavaScript event handlers intercept the keypress before
Electron's menu accelerator fires.
Proposed fix
Added a before-input-event listener on mainWindow.webContents that intercepts Ctrl/Cmd+Shift+V at the
Electron level — before the event reaches the renderer — and calls webContents.pasteAndMatchStyle()
directly. This works on all platforms.
Branch with fix: https://github.com/mishenThakshana/drawio-desktop/tree/fix-paste-plain-text-shortcut
Preflight Checklist
Describe the bug
Ctrl+Shift+V / Cmd+Shift+V (Paste without formatting) shortcut does not work in draw.io Desktop. The
draw.io web editor in the renderer process intercepts the keyboard event before Electron's menu
accelerator (pasteAndMatchStyle role) can handle it. On Windows/Linux, the application menu is set to
null, so the shortcut is never registered at all.
To Reproduce
Expected behavior
Text should be pasted as plain text without formatting.
draw.io version:
29.6.6
Desktop:
Root cause
In src/main/electron.js, the Edit menu with { role: 'pasteAndMatchStyle' } is only created for macOS.
Even on macOS, the draw.io web editor's JavaScript event handlers intercept the keypress before
Electron's menu accelerator fires.
Proposed fix
Added a before-input-event listener on mainWindow.webContents that intercepts Ctrl/Cmd+Shift+V at the
Electron level — before the event reaches the renderer — and calls webContents.pasteAndMatchStyle()
directly. This works on all platforms.
Branch with fix: https://github.com/mishenThakshana/drawio-desktop/tree/fix-paste-plain-text-shortcut