aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/formattedText/marks_rts.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2021-02-10 00:48:40 -0500
committerbobzel <zzzman@gmail.com>2021-02-10 00:48:40 -0500
commit7fedb7f75829269e46da5eaeb3b58166f9ab2126 (patch)
treebcadae8e02776dc328200dcdf18003103cad2a88 /src/client/views/nodes/formattedText/marks_rts.ts
parent46b569203a3890657ce799aa6b649cfc8bb431f2 (diff)
fixes for removing individual overlapping textanchors in a textBox. Hopefully near final cleanup of linkDocPreview and FormattedTextComment
Diffstat (limited to 'src/client/views/nodes/formattedText/marks_rts.ts')
-rw-r--r--src/client/views/nodes/formattedText/marks_rts.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/client/views/nodes/formattedText/marks_rts.ts b/src/client/views/nodes/formattedText/marks_rts.ts
index aceba0387..655ee7e44 100644
--- a/src/client/views/nodes/formattedText/marks_rts.ts
+++ b/src/client/views/nodes/formattedText/marks_rts.ts
@@ -23,7 +23,6 @@ export const marks: { [index: string]: MarkSpec } = {
linkAnchor: {
attrs: {
allAnchors: { default: [] as { href: string, title: string, anchorId: string }[] },
- showPreview: { default: true },
location: { default: null },
title: { default: null },
docref: { default: false } // flags whether the linked text comes from a document within Dash. If so, an attribution label is appended after the text
@@ -32,8 +31,8 @@ export const marks: { [index: string]: MarkSpec } = {
parseDOM: [{
tag: "a[href]", getAttrs(dom: any) {
return {
- allAnchors: [{ href: dom.getAttribute("shref"), title: dom.getAttribute("title"), anchorId: dom.getAttribute("class") }],
location: dom.getAttribute("location"),
+ title: dom.getAttribute("title")
};
}
}],
@@ -47,7 +46,7 @@ export const marks: { [index: string]: MarkSpec } = {
href: node.attrs.allAnchors[0].href,
}, node.attrs.title], ["br"]] :
//node.attrs.allLinks.length === 1 ?
- ["a", { ...node.attrs, class: anchorids, "data-targethrefs": targethrefs, title: node.attrs.title, href: node.attrs.allAnchors[0]?.href, style: `text-decoration: "underline"` }, 0];
+ ["a", { class: anchorids, "data-targethrefs": targethrefs, title: node.attrs.title, 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],