How to do a system copy (to clipboard)?

As the title, i just need an API, to have a string copied into system clipboard. I cant find it in the main docs. Thank you.

1 Like

Would like to know as well.

If you simply need to write something in the clipboard, use navigator.clipboard.writeText(string).

If you need more, like mimic the copying mechanism in Obsidian, I’m afraid it’s not possible. At last you need to properly parse the selected content and write it in the clipboard.

I created my own implementation of copying for example