diff options
author | bob <bcz@cs.brown.edu> | 2020-01-06 15:42:16 -0500 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2020-01-06 15:42:16 -0500 |
commit | ccd39c9a53ebf9aea84fcdcba6050145add4526f (patch) | |
tree | b25ebd60772b0d8437c4357d3551176323bb212b /src/client/util/RichTextSchema.tsx | |
parent | d622486b343e69640dd749d124f6c2da9850dc10 (diff) |
made doculinkbox show up at top right of text hyperlink. it's a hack that should be cleaned up if I can figure out how.
Diffstat (limited to 'src/client/util/RichTextSchema.tsx')
-rw-r--r-- | src/client/util/RichTextSchema.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/util/RichTextSchema.tsx b/src/client/util/RichTextSchema.tsx index 4fead71e5..2a5b348d2 100644 --- a/src/client/util/RichTextSchema.tsx +++ b/src/client/util/RichTextSchema.tsx @@ -274,6 +274,7 @@ export const marks: { [index: string]: MarkSpec } = { link: { attrs: { href: {}, + targetId: { default: "" }, showPreview: { default: true }, location: { default: null }, title: { default: null }, @@ -288,7 +289,7 @@ export const marks: { [index: string]: MarkSpec } = { toDOM(node: any) { return node.attrs.docref && node.attrs.title ? ["div", ["span", `"`], ["span", 0], ["span", `"`], ["br"], ["a", { ...node.attrs, class: "prosemirror-attribution", title: `${node.attrs.title}` }, node.attrs.title], ["br"]] : - ["a", { ...node.attrs, title: `${node.attrs.title}` }, 0]; + ["a", { ...node.attrs, id: node.attrs.targetId, title: `${node.attrs.title}` }, 0]; } }, |