mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-04 01:34:27 +00: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:
		@@ -27,6 +27,7 @@ export function createTippy(target, opts = {}) {
 | 
			
		||||
export function initTooltip(el, props = {}) {
 | 
			
		||||
  const content = el.getAttribute('data-content') || props.content;
 | 
			
		||||
  if (!content) return null;
 | 
			
		||||
  if (!el.hasAttribute('aria-label')) el.setAttribute('aria-label', content);
 | 
			
		||||
  return createTippy(el, {
 | 
			
		||||
    content,
 | 
			
		||||
    delay: 100,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user