La copia de texto general simplemente copia el texto sin dar ninguna importancia a los estilos. ¿Hay alguna forma de copiar texto sin perder sus propiedades inherentes, como la familia de fuentes, el tamaño de fuente, etc. Una función de javascript sería útil? Gracias.
Teniendo el elemento correcto seleccionado en el árbol HTML DOM, haga clic derecho sobre él y seleccione "Copiar" > "Copiar estilos".

Fuente: https://getcssscan.com/blog/how-to-inspect-copy-element-css
Puede usar Clipboard.write() con partes de texto y html:
// This will return the raw HTML, but perhaps you want to do something different, // for example: recursively embed computed styles: // https://developer.mozilla.org/en-US/docs/Web/API/Window/getComputedStyle function serializeElement (element: Element): string { return element.outerHTML; } async function copyTextWithStyles (element: Element): Promise<void> { const html = serializeElement(element); const htmlBlob = new Blob([html], {type: 'text/html'}); const text = element.textContent ?? ''; const textBlob = new Blob([text], {type: 'text/plain'}); const clipboardItem = new ClipboardItem({ [htmlBlob.type]: htmlBlob, [textBlob.type]: textBlob, }); return navigator.clipboard.write([clipboardItem]); }