Skip to content

Commit

Permalink
editor: hide edit link button when in read only mode (streetwriters#7018
Browse files Browse the repository at this point in the history
)

Signed-off-by: Luis Kriner <[email protected]>
  • Loading branch information
luis-411 authored Dec 6, 2024
1 parent 75c346a commit 0ffbf83
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/editor/src/toolbar/tools/link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0ffbf83

Please sign in to comment.