plugins-workspace
plugins-workspace copied to clipboard
Clipboard plugin not working
I'm working on a tauri application (repo) and for the life of me I can't figure out how to get the clipboard plugin to work. I have set the permissions as follows:
Tauri.conf.json
{
"productName": "Fluster",
"version": "0.3.19",
"identifier": "com.fluster.app",
"build": {
"beforeDevCommand": "pnpm dev",
"devUrl": "http://localhost:1420",
"beforeBuildCommand": "pnpm run build",
"frontendDist": "../dist"
},
"app": {
"withGlobalTauri": true,
"windows": [
{
"label": "main",
"title": "Fluster",
"titleBarStyle": "Overlay",
"maximized": true
}
],
"security": {
"csp": {
"default-src": "*",
"connect-src": "'self' http: https: ws: wss: blob: ipc: http://ipc.localhost",
"style-src": "'self' 'unsafe-inline'",
"img-src": "*",
"script-src": "'self' 'unsafe-inline' 'unsafe-eval' *",
"frame-src": "*"
},
"assetProtocol": {
"enable": true,
"scope": [
"**"
]
},
"capabilities": [
{
"identifier": "draggable-window",
"windows": [
"*"
],
"permissions": [
"core:default",
"core:window:allow-start-dragging",
"log:allow-log",
"log:default",
"dialog:allow-open",
"dialog:allow-save",
"clipboard-manager:allow-write-text",
"clipboard-manager:allow-read-text",
"clipboard-manager:allow-read-image",
{
"identifier": "shell:allow-spawn",
"allow": [
{
"name": "../src-python/fluster_sidecar_api/dist/fluster_python_sidecar",
"sidecar": true
}
]
},
{
"identifier": "opener:allow-open-url",
"allow": [
{
"url": "https://*"
}
]
},
"opener:allow-reveal-item-in-dir",
{
"identifier": "opener:allow-open-path",
"allow": [
{
"path": "*"
}
]
}
]
}
]
}
},
"bundle": {
"active": true,
"targets": "all",
"category": "Education",
"createUpdaterArtifacts": false,
"shortDescription": "Free & open source academic note taking.",
"publisher": "Fluster",
"icon": [
"icons/icon_bundle/fluster_profile_photo.png",
"icons/icon_bundle/1024-mac.icns",
"icons/icon_bundle/logo.ico"
],
"resources": [
"../public/**/*",
"./infoplist/*"
],
"macOS": {
"signingIdentity": "-"
},
"externalBin": [
"../src-python/fluster_sidecar_api/dist/fluster_python_sidecar"
]
}
}
capbilities/default.json
{
"$schema": "../gen/schemas/desktop-schema.json",
"identifier": "default",
"description": "Capability for the main window",
"windows": [
"main"
],
"permissions": [
"core:default",
"core:window:allow-start-dragging",
"log:allow-log",
"log:default",
"dialog:allow-open",
"dialog:allow-save",
"opener:allow-open-url",
"opener:allow-reveal-item-in-dir",
"shell:default",
"clipboard-manager:allow-write-text",
"clipboard-manager:allow-read-text",
"clipboard-manager:allow-read-image",
{
"identifier": "shell:allow-spawn",
"allow": [
{
"name": "../src-python/fluster_sidecar_api/dist/fluster_python_sidecar",
"sidecar": true
}
]
},
{
"identifier": "opener:allow-open-path",
"allow": [
{
"path": "*"
}
]
}
]
}
And in my lib.rs:
...
tauri::Builder::default()
.plugin(tauri_plugin_clipboard_manager::init())
.plugin(tauri_plugin_shell::init())
.plugin(tauri_plugin_dialog::init())
.plugin(prevent)
.plugin(tauri_plugin_single_instance::init(|_, _, _| {}))
.plugin(tauri_plugin_opener::init())
.plugin(tauri_plugin_network::init())
...
Any help is greatly appreciated.
what isn't working for you? and do you see any errors?