A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
editor: don't show download button for dataurl images
Abdullah Attab02941d5aa9f
diff --git a/packages/editor/src/extensions/image/component.tsx b/packages/editor/src/extensions/image/component.tsxindex a402fd743..67904c63a 100644--- a/packages/editor/src/extensions/image/component.tsx+++ b/packages/editor/src/extensions/image/component.tsx@@ -175,22 +175,13 @@ export function ImageComponent(><ToolbarGroupeditor={editor}- tools={- float- ? [- "downloadAttachment",- "imageAlignLeft",- "imageAlignRight",- "imageProperties"- ]- : [- "downloadAttachment",- "imageAlignLeft",- "imageAlignCenter",- "imageAlignRight",- "imageProperties"- ]- }+ tools={[+ hash ? "downloadAttachment" : "none",+ "imageAlignLeft",+ float ? "none" : "imageAlignCenter",+ "imageAlignRight",+ "imageProperties"+ ]}sx={{boxShadow: "menu",borderRadius: "default",diff --git a/packages/editor/src/toolbar/tool-definitions.ts b/packages/editor/src/toolbar/tool-definitions.tsindex 606f19380..0962e7e73 100644--- a/packages/editor/src/toolbar/tool-definitions.ts+++ b/packages/editor/src/toolbar/tool-definitions.ts@@ -21,6 +21,10 @@ import { ToolbarDefinition, ToolDefinition } from "./types";import { ToolId } from "./tools";const tools: Record<ToolId, ToolDefinition> = {+ none: {+ icon: "none",+ title: ""+ },bold: {icon: "bold",title: "Bold"diff --git a/packages/editor/src/toolbar/tools/index.ts b/packages/editor/src/toolbar/tools/index.tsindex d1a7269ff..98611ba1a 100644--- a/packages/editor/src/toolbar/tools/index.ts+++ b/packages/editor/src/toolbar/tools/index.ts@@ -160,7 +160,9 @@ const tools = {deleteTable: DeleteTable,outdent: Outdent,- indent: Indent+ indent: Indent,++ none: () => null};export function findTool(id: ToolId): React.FunctionComponent<ToolProps> {