mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 13:01:31 +08:00 
			
		
		
		
	
							parent
							
								
									1690248e24
								
							
						
					
					
						commit
						1876664dfb
					
				| @ -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
	 Heniker
						Heniker