mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-01 10:01:07 +02:00
docs(clipboard): Added allowlist section to the Clipboard module (#5014)
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user