aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/views/nodes/FormattedTextBox.tsx1
-rw-r--r--src/client/views/nodes/LinkMenuItem.tsx7
2 files changed, 7 insertions, 1 deletions
diff --git a/src/client/views/nodes/FormattedTextBox.tsx b/src/client/views/nodes/FormattedTextBox.tsx
index 33edcc7f6..8d9944d59 100644
--- a/src/client/views/nodes/FormattedTextBox.tsx
+++ b/src/client/views/nodes/FormattedTextBox.tsx
@@ -187,6 +187,7 @@ export class FormattedTextBox extends DocComponent<(FieldViewProps & FormattedTe
marks[linkIndex].attrs.guid = guid;
return node;
}
+ console.log('href was and is ', href, marks[linkIndex].attrs.href);
}
return undefined;
}
diff --git a/src/client/views/nodes/LinkMenuItem.tsx b/src/client/views/nodes/LinkMenuItem.tsx
index a012c9db2..ffc191235 100644
--- a/src/client/views/nodes/LinkMenuItem.tsx
+++ b/src/client/views/nodes/LinkMenuItem.tsx
@@ -47,9 +47,13 @@ export class LinkMenuItem extends React.Component<LinkMenuItemProps> {
let sourceContext = await Cast(proto.sourceContext, Doc);
let guid = StrCast(this.props.linkDoc.guid);
let href;
+ let href2;
if (sourceContext) {
href = Utils.prepend("/doc/" + sourceContext[Id]); // trying to get id (?) so that we can search for this in the link marks
}
+ if (targetContext) {
+ href2 = Utils.prepend("/doc/" + targetContext[Id]); // trying to get id (?) so that we can search for this in the link marks
+ }
let self = this;
let dockingFunc = (document: Doc) => { this.props.addDocTab(document, undefined, "inTab"); SelectionManager.DeselectAll(); };
@@ -65,9 +69,10 @@ export class LinkMenuItem extends React.Component<LinkMenuItemProps> {
if (guid) {
jumpToDoc.guid = guid;
} else if (href) { // retroactively fixing old in-text links by adding guid
- console.log('wegotthis', href, guid);
+ console.log('wegotthis', href, href2, proto.href, guid);
jumpToDoc.linkHref = href;
let newguid = Utils.GenerateGuid();
+ this.props.linkDoc.guid = newguid;
jumpToDoc.guid = newguid;
}
}