|
@@ -6,6 +6,23 @@
|
|
|
* Read and write to the system clipboard.
|
|
|
*
|
|
|
* This package is also accessible with `window.__TAURI__.clipboard` when [`build.withGlobalTauri`](https://tauri.app/v1/api/config/#buildconfig.withglobaltauri) in `tauri.conf.json` is set to `true`.
|
|
|
+ *
|
|
|
+ * The APIs must be added to [`tauri.allowlist.clipboard`](https://tauri.app/v1/api/config/#allowlistconfig.clipboard) in `tauri.conf.json`:
|
|
|
+ * ```json
|
|
|
+ * {
|
|
|
+ * "tauri": {
|
|
|
+ * "allowlist": {
|
|
|
+ * "clipboard": {
|
|
|
+ * "all": true, // enable all Clipboard APIs
|
|
|
+ * "writeText": true,
|
|
|
+ * "readText": true
|
|
|
+ * }
|
|
|
+ * }
|
|
|
+ * }
|
|
|
+ * }
|
|
|
+ * ```
|
|
|
+ * It is recommended to allowlist only the APIs you use for optimal bundle size and security.
|
|
|
+ *
|
|
|
* @module
|
|
|
*/
|
|
|
|