Use navigator.clipboard.writeText() method. Here's how - https://developer.mozilla.org/en-US/docs/Web/API/Clipboard/writeText
Oh, I get your question You can get this on Google But here is a code you might like to play around with https://code.sololearn.com/WqZC2806VoN8/?ref=app
Manav Roy You can try it https://www.acugis.com/relauncher2019/css/code-box/
If you don't like prism code highlighter you can also use monako code editor made by Microsoft vs code.