aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/DropConverter.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-09-13 23:15:20 -0400
committerbobzel <zzzman@gmail.com>2020-09-13 23:15:20 -0400
commite02715b188a8fbaf47b5aef9e1bc892bf57627a6 (patch)
tree094bba2edcfc8be2e5267cd0520aab544f674e73 /src/client/util/DropConverter.ts
parentd6094e43606763ef9499f3e1fd42ac619e493135 (diff)
got rid of textTemplates which were superfluous. fixed problems with stored Marks on templates when creating one by typing and the template is the default layout.
Diffstat (limited to 'src/client/util/DropConverter.ts')
-rw-r--r--src/client/util/DropConverter.ts6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/client/util/DropConverter.ts b/src/client/util/DropConverter.ts
index 49643b5bb..1bbd46938 100644
--- a/src/client/util/DropConverter.ts
+++ b/src/client/util/DropConverter.ts
@@ -37,11 +37,7 @@ export function makeTemplate(doc: Doc, first: boolean = true, rename: Opt<string
}
});
if (first) {
- if (docs.length) { // bcz: feels hacky : if the root level document has items, it's not a field template, but we still want its caption to be a textTemplate
- if (doc.caption instanceof RichTextField && !doc.caption.Empty()) {
- doc["caption-textTemplate"] = ComputedField.MakeFunction(`copyField(this.caption)`);
- }
- } else {
+ if (!docs.length) { // bcz: feels hacky : if the root level document has items, it's not a field template
any = Doc.MakeMetadataFieldTemplate(doc, Doc.GetProto(layoutDoc)) || any;
}
}