I have a (fancy) DLL that in windows apps exposes the clipboard, and allows me to write a block of text either AS text, or as HTML.

SO you see the results of some calculations on screen, with a "copy Result" button, and then you can alt-tab over to Excel or word, or notepad++ and paste, and notepad++ will paste the raw text of your result, and in word it comes out as a neatly formatted table.

In the WEB app this is harder. I asked chat GPT and it wrote me this:

function copyHtmlToClipboard(html) { const blob = new Blob(
HTML Code:
, { type: 'text/html' });    const clipboardItem = new ClipboardItem({ 'text/html': blob });
    navigator.clipboard.write([clipboardItem]).then(() => {        console.log('HTML copied to clipboard successfully!');    }).catch(err => {        console.error('Failed to copy HTML: ', err);    });}
// Example usagecopyHtmlToClipboard('<html><body>foo</body></html>');
does the framework already implement any of this? or am I heading into writing lots of JS code?