aboutsummaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/client')
-rw-r--r--src/client/util/RichTextSchema.tsx2
-rw-r--r--src/client/views/nodes/DocumentView.tsx1
2 files changed, 3 insertions, 0 deletions
diff --git a/src/client/util/RichTextSchema.tsx b/src/client/util/RichTextSchema.tsx
index f027a4bf7..2750203f2 100644
--- a/src/client/util/RichTextSchema.tsx
+++ b/src/client/util/RichTextSchema.tsx
@@ -135,6 +135,7 @@ export const nodes: { [index: string]: NodeSpec } = {
alt: { default: null },
title: { default: null },
float: { default: "left" },
+ location: { default: "onRight" },
docid: { default: "" }
},
group: "inline",
@@ -616,6 +617,7 @@ export class ImageResizeView {
e.preventDefault();
e.stopPropagation();
DocServer.GetRefField(node.attrs.docid).then(async linkDoc => {
+ const location = node.attrs.location;
if (linkDoc instanceof Doc) {
let proto = Doc.GetProto(linkDoc);
let targetContext = await Cast(proto.targetContext, Doc);
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx
index 81805af64..bf7e7df97 100644
--- a/src/client/views/nodes/DocumentView.tsx
+++ b/src/client/views/nodes/DocumentView.tsx
@@ -606,6 +606,7 @@ export class DocumentView extends DocComponent<DocumentViewProps, Document>(Docu
Doc.MakeTemplate(fieldTemplate, metaKey, proto);
Doc.ApplyTemplateTo(docTemplate, document, undefined, false);
+ document.customLayout = document.layout;
}
});
});