mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-03 20:06:08 +01:00 
			
		
		
		
	@@ -288,6 +288,9 @@ function registerEntrypoints() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        searchNotesService.searchInSubtree(node.data.noteId);
 | 
					        searchNotesService.searchInSubtree(node.data.noteId);
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    $('document').on('copy', utils.copySelectionToClipboard)
 | 
				
			||||||
 | 
					    keyboardActionService.setGlobalActionHandler("CopyWithoutFormating", utils.copySelectionToClipboard)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default {
 | 
					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 {
 | 
					export default {
 | 
				
			||||||
    reloadApp,
 | 
					    reloadApp,
 | 
				
			||||||
    parseDate,
 | 
					    parseDate,
 | 
				
			||||||
@@ -273,5 +280,6 @@ export default {
 | 
				
			|||||||
    isHtmlEmpty,
 | 
					    isHtmlEmpty,
 | 
				
			||||||
    clearBrowserCache,
 | 
					    clearBrowserCache,
 | 
				
			||||||
    getUrlForDownload,
 | 
					    getUrlForDownload,
 | 
				
			||||||
    normalizeShortcut
 | 
					    normalizeShortcut,
 | 
				
			||||||
 | 
					    copySelectionToClipboard
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
@@ -306,6 +306,10 @@ const DEFAULT_KEYBOARD_ACTIONS = [
 | 
				
			|||||||
    {
 | 
					    {
 | 
				
			||||||
        actionName: "ZoomIn",
 | 
					        actionName: "ZoomIn",
 | 
				
			||||||
        defaultShortcuts: ["CommandOrControl+="]
 | 
					        defaultShortcuts: ["CommandOrControl+="]
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        actionName: "CopyWithoutFormating",
 | 
				
			||||||
 | 
					        defaultShortcuts: ["Alt+Ctrl+C"]
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
];
 | 
					];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user