writeText

suspend fun writeText(data: String)(source)

The writeText() method of the Clipboard interface writes the specified text to the system clipboard, returning a Promise that is resolved once the system clipboard has been updated.

MDN Reference