mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
parent
1690248e24
commit
1876664dfb
@ -241,7 +241,7 @@ function registerEntrypoints() {
|
||||
|
||||
d.showDialog(selectedOrActiveNodes);
|
||||
}));
|
||||
|
||||
|
||||
keyboardActionService.setGlobalActionHandler("CreateNoteIntoDayNote", async () => {
|
||||
const todayNote = await dateNoteService.getTodayNote();
|
||||
|
||||
@ -288,6 +288,9 @@ function registerEntrypoints() {
|
||||
|
||||
searchNotesService.searchInSubtree(node.data.noteId);
|
||||
});
|
||||
|
||||
$('document').on('copy', utils.copySelectionToClipboard)
|
||||
keyboardActionService.setGlobalActionHandler("CopyWithoutFormating", utils.copySelectionToClipboard)
|
||||
}
|
||||
|
||||
export default {
|
||||
|
@ -241,6 +241,13 @@ function getUrlForDownload(url) {
|
||||
}
|
||||
}
|
||||
|
||||
function copySelectionToClipboard() {
|
||||
const text = window.getSelection().toString()
|
||||
if (navigator.clipboard) {
|
||||
navigator.clipboard.writeText(text)
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
reloadApp,
|
||||
parseDate,
|
||||
@ -273,5 +280,6 @@ export default {
|
||||
isHtmlEmpty,
|
||||
clearBrowserCache,
|
||||
getUrlForDownload,
|
||||
normalizeShortcut
|
||||
normalizeShortcut,
|
||||
copySelectionToClipboard
|
||||
};
|
@ -306,6 +306,10 @@ const DEFAULT_KEYBOARD_ACTIONS = [
|
||||
{
|
||||
actionName: "ZoomIn",
|
||||
defaultShortcuts: ["CommandOrControl+="]
|
||||
},
|
||||
{
|
||||
actionName: "CopyWithoutFormating",
|
||||
defaultShortcuts: ["Alt+Ctrl+C"]
|
||||
}
|
||||
];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user