diff --git a/js/contextMenus.js b/js/contextMenus.js index 304cb51bc28..17f0c537b57 100644 --- a/js/contextMenus.js +++ b/js/contextMenus.js @@ -629,7 +629,7 @@ function getMisspelledSuggestions (selection, isMisspelled, suggestions) { return menuUtil.sanitizeTemplateItems(template) } -function getEditableItems (selection, editFlags) { +function getEditableItems (selection, editFlags, hasFormat) { const hasSelection = selection.length > 0 const hasClipboard = clipboard.readText().length > 0 const template = [] @@ -657,6 +657,16 @@ function getEditableItems (selection, editFlags) { enabled: hasClipboard, role: 'paste' }) + if (hasFormat) { + template.push({ + label: locale.translation('pasteWithoutFormatting'), + accelerator: 'Shift+CmdOrCtrl+V', + enabled: hasClipboard, + click: function (item, focusedWindow) { + focusedWindow.webContents.pasteAndMatchStyle() + } + }) + } } return menuUtil.sanitizeTemplateItems(template) } @@ -977,7 +987,7 @@ function mainTemplateInit (nodeProps, frame) { } } - const editableItems = getEditableItems(nodeProps.selectionText, nodeProps.editFlags) + const editableItems = getEditableItems(nodeProps.selectionText, nodeProps.editFlags, true) template.push(...misspelledSuggestions, { label: locale.translation('undo'), accelerator: 'CmdOrCtrl+Z',