From 7735795a5660ed03a711e29cd0240736c9444fe1 Mon Sep 17 00:00:00 2001 From: sharkiecodes Date: Mon, 21 Apr 2025 19:58:47 -0400 Subject: scrapbooks --- src/client/documents/DocUtils.ts | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/client/documents/DocUtils.ts b/src/client/documents/DocUtils.ts index 7b36c3a66..db0770b12 100644 --- a/src/client/documents/DocUtils.ts +++ b/src/client/documents/DocUtils.ts @@ -308,6 +308,13 @@ export namespace DocUtils { */ export async function DocumentFromType(type: string, path: string, options: DocumentOptions, overwriteDoc?: Doc): Promise> { let ctor: ((path: string, options: DocumentOptions, overwriteDoc?: Doc) => Doc | Promise) | undefined; + + if (type.indexOf('scrapbook') !== -1) { + ctor = Docs.Create.ScrapbookDocument; + if (!options._width) options._width = 400; + if (!options._title) options._title = 'New Scrapbook'; + } + if (type.indexOf('image') !== -1) { ctor = Docs.Create.ImageDocument; if (!options._width) options._width = 300; -- cgit v1.2.3-70-g09d2