aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/formattedText/marks_rts.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2022-11-04 12:43:59 -0400
committerbobzel <zzzman@gmail.com>2022-11-04 12:43:59 -0400
commitfe98c7d46df1852a74cd84dbe9ad010bfb3d5550 (patch)
treed1c96f67d824e98907fbe36697e0523d1af9b7bb /src/client/views/nodes/formattedText/marks_rts.ts
parent770f546a38d7ec827bff55fd0dd64b873a112180 (diff)
more fixes to pdf and text to allow dashfieldview nodes to be link anchors and make sidebar annotations work better.
Diffstat (limited to 'src/client/views/nodes/formattedText/marks_rts.ts')
-rw-r--r--src/client/views/nodes/formattedText/marks_rts.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/views/nodes/formattedText/marks_rts.ts b/src/client/views/nodes/formattedText/marks_rts.ts
index 00c41e187..4206a1006 100644
--- a/src/client/views/nodes/formattedText/marks_rts.ts
+++ b/src/client/views/nodes/formattedText/marks_rts.ts
@@ -75,6 +75,7 @@ export const marks: { [index: string]: MarkSpec } = {
allAnchors: { default: [] as { href: string; title: string; anchorId: string }[] },
location: { default: null },
title: { default: null },
+ noPreview: { default: false },
docref: { default: false }, // flags whether the linked text comes from a document within Dash. If so, an attribution label is appended after the text
},
inclusive: false,
@@ -85,6 +86,7 @@ export const marks: { [index: string]: MarkSpec } = {
return {
location: dom.getAttribute('location'),
title: dom.getAttribute('title'),
+ noPreview: dom.getAttribute('noPreview'),
};
},
},
@@ -111,7 +113,7 @@ export const marks: { [index: string]: MarkSpec } = {
['br'],
]
: //node.attrs.allLinks.length === 1 ?
- ['a', { class: anchorids, 'data-targethrefs': targethrefs, title: node.attrs.title, location: node.attrs.location, style: `text-decoration: underline` }, 0];
+ ['a', { class: anchorids, 'data-targethrefs': targethrefs, title: node.attrs.title, noPreview: node.attrs.noPreview, location: node.attrs.location, style: `text-decoration: underline` }, 0];
// ["div", { class: "prosemirror-anchor" },
// ["span", { class: "prosemirror-linkBtn" },
// ["a", { ...node.attrs, class: linkids, "data-targetids": targetids, title: `${node.attrs.title}` }, 0],