diff options
| author | bobzel <zzzman@gmail.com> | 2023-05-22 11:25:32 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2023-05-22 11:25:32 -0400 |
| commit | bed3309e1fda6597b2a8fea10ad82cd3a0402051 (patch) | |
| tree | fe599bbdc5fca2c221e1e0f7a60995b7cd39f870 /src/fields/RichTextUtils.ts | |
| parent | 887a4f7e0fc25fde87b20a5de2e7b0aee561cc78 (diff) | |
| parent | 3d26d5b2654841a9b92f3d66b28d1dc8e36cca6a (diff) | |
merged physics with master
Diffstat (limited to 'src/fields/RichTextUtils.ts')
| -rw-r--r-- | src/fields/RichTextUtils.ts | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/fields/RichTextUtils.ts b/src/fields/RichTextUtils.ts index bf055cd8b..24cd078f2 100644 --- a/src/fields/RichTextUtils.ts +++ b/src/fields/RichTextUtils.ts @@ -264,18 +264,18 @@ export namespace RichTextUtils { const imageNode = (schema: any, image: ImageTemplate, textNote: Doc) => { const { url: src, width, agnostic } = image; - let docid: string; + let docId: string; const guid = Utils.GenerateDeterministicGuid(agnostic); const backingDocId = StrCast(textNote[guid]); if (!backingDocId) { const backingDoc = Docs.Create.ImageDocument(agnostic, { _width: 300, _height: 300 }); DocUtils.makeCustomViewClicked(backingDoc, Docs.Create.FreeformDocument); - docid = backingDoc[Id]; - textNote[guid] = docid; + docId = backingDoc[Id]; + textNote[guid] = docId; } else { - docid = backingDocId; + docId = backingDocId; } - return schema.node('image', { src, agnostic, width, docid, float: null, location: 'add:right' }); + return schema.node('image', { src, agnostic, width, docId, float: null, location: 'add:right' }); }; const textNode = (schema: any, run: docs_v1.Schema$TextRun) => { @@ -395,11 +395,11 @@ export namespace RichTextUtils { if (new RegExp(window.location.origin + delimiter).test(url) && !url.endsWith(alreadyShared)) { const linkDoc = await DocServer.GetRefField(url.split(delimiter)[1]); if (linkDoc instanceof Doc) { - let exported = (await Cast(linkDoc.anchor2, Doc))!; + let exported = (await Cast(linkDoc.link_anchor_2, Doc))!; if (!exported.customLayout) { - exported = Doc.MakeAlias(exported); + exported = Doc.MakeEmbedding(exported); DocUtils.makeCustomViewClicked(exported, Docs.Create.FreeformDocument); - linkDoc.anchor2 = exported; + linkDoc.link_anchor_2 = exported; } url = Utils.shareUrl(exported[Id]); } |
