Skip to content

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

web: add support for printing notes (#2551)

Muhammad Ali2761222b36b9
diff --git a/apps/web/src/components/note/index.js b/apps/web/src/components/note/index.js
index bdae1cede..954dd8cb4 100644
--- a/apps/web/src/components/note/index.js
+++ b/apps/web/src/components/note/index.js
@@ -373,6 +373,18 @@ const menuItems = [
items: colorsToMenuItems()
},
{ key: "sep2", type: "separator" },
+ {
+ key: "print",
+ title: "Print",
+ disabled: ({ note }) => {
+ if (!db.notes.note(note.id).synced()) return notFullySyncedText;
+ if (note.locked) return "Locked notes cannot be printed.";
+ },
+ icon: Icon.Print,
+ onClick: async ({ note }) => {
+ await exportNotes("pdf", [note.id]);
+ }
+ },
{
key: "publish",
disabled: ({ note }) => {