Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

desktop: add buttons in context menu for copy link & copy link text

ammarahm-edc386e9283143
diff --git a/apps/desktop/src/utils/menu.ts b/apps/desktop/src/utils/menu.ts
index 70c6bb58b..c7e3213ac 100644
--- a/apps/desktop/src/utils/menu.ts
+++ b/apps/desktop/src/utils/menu.ts
@@ -101,6 +101,26 @@ function setupMenu() {
})
);
+ if (params.linkURL?.length) {
+ menu.append(
+ new MenuItem({
+ label: "Copy link",
+ click() {
+ clipboard.writeText(params.linkURL);
+ }
+ })
+ );
+
+ menu.append(
+ new MenuItem({
+ label: "Copy link text",
+ click() {
+ clipboard.writeText(params.linkText);
+ }
+ })
+ );
+ }
+
if (params.selectionText.length) {
menu.append(
new MenuItem({