From 696ae072b1f00d616450d76bc016aebcc1c102fc Mon Sep 17 00:00:00 2001 From: aaravkumar Date: Fri, 7 Mar 2025 00:13:01 -0500 Subject: attempted adding formatting --- src/client/documents/Documents.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/client/documents') diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts index fe6e6b22d..d21fa04d4 100644 --- a/src/client/documents/Documents.ts +++ b/src/client/documents/Documents.ts @@ -919,9 +919,15 @@ export namespace Docs { // AARAV ADD // export function DailyJournalDocument(text: string | RichTextField, options: DocumentOptions = {}, fieldKey: string = 'text') { + const styles = { + bold: true, // Make the journal date bold + color: 'blue', // Set the journal date color to blue + fontSize: 18, // Set the font size to 18px for the whole text + }; + return InstanceFromProto( Prototypes.get(DocumentType.JOURNAL), - typeof text === 'string' ? RichTextField.textToRtf(text) : text, + typeof text === 'string' ? RichTextField.textToRtfFormatting(text, undefined, undefined, styles) : text, { title: new Date().toLocaleDateString(undefined, { weekday: 'long', -- cgit v1.2.3-70-g09d2