diff --git a/shared/editor/marks/Link.tsx b/shared/editor/marks/Link.tsx
index 1460cc2602..b548a667ff 100644
--- a/shared/editor/marks/Link.tsx
+++ b/shared/editor/marks/Link.tsx
@@ -116,6 +116,11 @@ export default class Link extends Mark {
}
get plugins() {
+ const component = ;
+ const icon = document.createElement("span");
+ icon.className = "external-link";
+ ReactDOM.render(component, icon);
+
const getLinkDecorations = (doc: Node) => {
const decorations: Decoration[] = [];
const links = findLinkNodes(doc);
@@ -130,15 +135,13 @@ export default class Link extends Mark {
// place the decoration at the end of the link
nodeWithPos.pos + nodeWithPos.node.nodeSize,
() => {
- const component = ;
- const icon = document.createElement("span");
- icon.className = "external-link";
- ReactDOM.render(component, icon);
- return icon;
+ console.log(icon);
+ return icon.cloneNode(true);
},
{
// position on the right side of the position
side: 1,
+ key: "external-link",
}
)
);