diff options
author | Aubrey Li <Aubrey-Li> | 2022-04-14 17:43:09 -0400 |
---|---|---|
committer | Aubrey Li <Aubrey-Li> | 2022-04-14 17:43:09 -0400 |
commit | cf379920876cafa84b0f342dbd981d60a66b6b4a (patch) | |
tree | 3059e2cbc4028abe0b308c5a0fc59744b60faeb5 /src/client/views/nodes/formattedText/marks_rts.ts | |
parent | 98567999b9882ed093bb0d750504a1bd10aa9a94 (diff) | |
parent | 9ec7503370229c17cf8a0d3cf77571010db04a9b (diff) |
Merge remote-tracking branch 'origin/presentation_group_test' into presentation_upgrade
Diffstat (limited to 'src/client/views/nodes/formattedText/marks_rts.ts')
-rw-r--r-- | src/client/views/nodes/formattedText/marks_rts.ts | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/client/views/nodes/formattedText/marks_rts.ts b/src/client/views/nodes/formattedText/marks_rts.ts index 52ef06b7f..1f6ce014f 100644 --- a/src/client/views/nodes/formattedText/marks_rts.ts +++ b/src/client/views/nodes/formattedText/marks_rts.ts @@ -19,13 +19,17 @@ export const marks: { [index: string]: MarkSpec } = { }, - // :: MarkSpec A linkAnchor. The anchor can have multiple links, where each link has an href URL and a title for use in menus and hover (Dash links have linkIDs & targetIDs). `title` - // defaults to the empty string. Rendered and parsed as an `<a>` + // :: MarkSpec an autoLinkAnchor. These are automatically generated anchors to "published" documents based on the anchor text matching the + // published document's title. + // NOTE: unlike linkAnchors, the autoLinkAnchor's href's indicate the target anchor of the hyperlink and NOT the source. This is because + // automatic links do not create a text selection Marker document for the source anchor, but use the text document itself. Since + // multiple automatic links can be created each having the same source anchor (the whole document), the target href of the link is needed to + // disambiguate links from one another. + // Rendered and parsed as an `<a>` // element. autoLinkAnchor: { attrs: { allAnchors: { default: [] as { href: string, title: string, anchorId: string }[] }, - linkDoc: { default: "" }, location: { default: null }, title: { default: null }, }, @@ -44,7 +48,8 @@ export const marks: { [index: string]: MarkSpec } = { return ["a", { class: anchorids, "data-targethrefs": targethrefs, "data-linkdoc": node.attrs.linkDoc, title: node.attrs.title, location: node.attrs.location, style: `background: lightBlue` }, 0]; } }, - // :: MarkSpec A linkAnchor. The anchor can have multiple links, where each link has an href URL and a title for use in menus and hover (Dash links have linkIDs & targetIDs). `title` + // :: MarkSpec A linkAnchor. The anchor can have multiple links, where each linkAnchor specifies an href to the URL of the source selection Marker text, + // and a title for use in menus and hover. `title` // defaults to the empty string. Rendered and parsed as an `<a>` // element. linkAnchor: { |