aboutsummaryrefslogtreecommitdiff
path: root/src/new_fields/RichTextUtils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/new_fields/RichTextUtils.ts')
-rw-r--r--src/new_fields/RichTextUtils.ts10
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);