Skip to content

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

editor: hide edit link button when in read only mode (#7018)

luis-4110ffbf8314162
diff --git a/packages/editor/src/toolbar/tools/link.tsx b/packages/editor/src/toolbar/tools/link.tsx
index 2e9d49048..f14f9fb11 100644
--- a/packages/editor/src/toolbar/tools/link.tsx
+++ b/packages/editor/src/toolbar/tools/link.tsx
@@ -107,6 +107,7 @@ export function EditLink(props: ToolProps) {
const link = node ? findMark(node, LinkNode.name) : null;
const attrs = link?.attrs || getMarkAttributes(editor.state, LinkNode.name);
+ if (!editor.isEditable) return null;
if (attrs && isInternalLink(attrs.href))
return (
<ToolButton