fixes of the new CopyWithoutFormatting

This commit is contained in:
zadam 2020-01-19 09:25:35 +01:00
parent 1876664dfb
commit ab535bf147
3 changed files with 5 additions and 6 deletions

View file

@ -289,8 +289,7 @@ function registerEntrypoints() {
searchNotesService.searchInSubtree(node.data.noteId);
});
$('document').on('copy', utils.copySelectionToClipboard)
keyboardActionService.setGlobalActionHandler("CopyWithoutFormating", utils.copySelectionToClipboard)
keyboardActionService.setGlobalActionHandler("CopyWithoutFormatting", utils.copySelectionToClipboard);
}
export default {

View file

@ -242,9 +242,9 @@ function getUrlForDownload(url) {
}
function copySelectionToClipboard() {
const text = window.getSelection().toString()
const text = window.getSelection().toString();
if (navigator.clipboard) {
navigator.clipboard.writeText(text)
navigator.clipboard.writeText(text);
}
}

View file

@ -308,8 +308,8 @@ const DEFAULT_KEYBOARD_ACTIONS = [
defaultShortcuts: ["CommandOrControl+="]
},
{
actionName: "CopyWithoutFormating",
defaultShortcuts: ["Alt+Ctrl+C"]
actionName: "CopyWithoutFormatting",
defaultShortcuts: ["CommandOrControl+Alt+C"]
}
];