mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Improvements for Content Copy (#21842)
It now supports copying Markdown, SVG and Images (not in Firefox currently because of lacking [`ClipboardItem`](https://developer.mozilla.org/en-US/docs/Web/API/ClipboardItem) support, but can be enabled in `about:config` and works). It will fetch the data if in a rendered view or when it's an image. Followup to https://github.com/go-gitea/gitea/pull/21629.
This commit is contained in:
		@@ -89,6 +89,7 @@ import {initRepoWikiForm} from './features/repo-wiki.js';
 | 
			
		||||
import {initRepoCommentForm, initRepository} from './features/repo-legacy.js';
 | 
			
		||||
import {initFormattingReplacements} from './features/formatting.js';
 | 
			
		||||
import {initMcaptcha} from './features/mcaptcha.js';
 | 
			
		||||
import {initCopyContent} from './features/copycontent.js';
 | 
			
		||||
 | 
			
		||||
// Run time-critical code as soon as possible. This is safe to do because this
 | 
			
		||||
// script appears at the end of <body> and rendered HTML is accessible at that point.
 | 
			
		||||
@@ -136,6 +137,7 @@ $(document).ready(() => {
 | 
			
		||||
  initStopwatch();
 | 
			
		||||
  initTableSort();
 | 
			
		||||
  initFindFileInRepo();
 | 
			
		||||
  initCopyContent();
 | 
			
		||||
 | 
			
		||||
  initAdminCommon();
 | 
			
		||||
  initAdminEmails();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user