diff options
| author | Sam Wilkins <samwilkins333@gmail.com> | 2019-09-16 10:27:55 -0400 |
|---|---|---|
| committer | Sam Wilkins <samwilkins333@gmail.com> | 2019-09-16 10:27:55 -0400 |
| commit | fe2b302288d120a0b68a3fa9e078d14445de1251 (patch) | |
| tree | 7533ce78b29f45103b8feea0fecac4f4f91e3fcc /src/new_fields | |
| parent | d7012323e87c21a25c29d89d66a1c54b99c8b458 (diff) | |
updates
Diffstat (limited to 'src/new_fields')
| -rw-r--r-- | src/new_fields/RichTextUtils.ts | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/new_fields/RichTextUtils.ts b/src/new_fields/RichTextUtils.ts index ab5e677c8..5b1da2669 100644 --- a/src/new_fields/RichTextUtils.ts +++ b/src/new_fields/RichTextUtils.ts @@ -278,7 +278,7 @@ export namespace RichTextUtils { } else { docid = backingDocId; } - return schema.node("image", { src, width, docid }); + return schema.node("image", { src, width, docid, float: null }); }; const textNode = (schema: any, run: docs_v1.Schema$TextRun) => { @@ -331,6 +331,7 @@ export namespace RichTextUtils { ["strong", "bold"], ["em", "italic"], ["pFontColor", "foregroundColor"], + ["pFontSize", "fontSize"], ["timesNewRoman", "weightedFontFamily"], ["georgia", "weightedFontFamily"], ["comicSans", "weightedFontFamily"], @@ -382,21 +383,24 @@ export namespace RichTextUtils { const delimiter = "/doc/"; const alreadyShared = "?sharing=true"; if (new RegExp(window.location.origin + delimiter).test(url) && !url.endsWith(alreadyShared)) { + alert("Reassigning alias!"); const linkDoc = await DocServer.GetRefField(url.split(delimiter)[1]); if (linkDoc instanceof Doc) { const target = (await Cast(linkDoc.anchor2, Doc))!; const exported = Doc.MakeAlias(target); DocumentView.makeCustomViewClicked(exported); - target && (url = Utils.shareUrl(exported[Id])); + const documentId = exported[Id]; + target && (url = Utils.shareUrl(documentId)); linkDoc.anchor2 = exported; } } + alert(`url: ${url}`); value = { url }; textStyle.foregroundColor = fromRgb.blue; textStyle.bold = true; break; case "fontSize": - value = attrs.fontSize; + value = { magnitude: attrs.fontSize, unit: "PT" }; break; case "foregroundColor": value = fromHex(attrs.color); |
