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/views/nodes/formattedText/DailyJournal.tsx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/client/views') diff --git a/src/client/views/nodes/formattedText/DailyJournal.tsx b/src/client/views/nodes/formattedText/DailyJournal.tsx index 7999357b0..42c559da4 100644 --- a/src/client/views/nodes/formattedText/DailyJournal.tsx +++ b/src/client/views/nodes/formattedText/DailyJournal.tsx @@ -31,7 +31,7 @@ export class DailyJournal extends ViewBoxAnnotatableComponent() month: 'long', day: 'numeric', }); - console.log('📆 getFormattedDate():', date); + console.log('getFormattedDate():', date); return date; } @@ -56,8 +56,19 @@ export class DailyJournal extends ViewBoxAnnotatableComponent() console.log('Checking if dataDoc has text field...'); + 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 + }; + console.log('Setting new text field with:', initialText); - this.dataDoc[this.fieldKey] = RichTextField.textToRtf(initialText, undefined, placeholderText.length); + this.dataDoc[this.fieldKey] = RichTextField.textToRtfFormatting( + initialText, + undefined, // No image DocId + placeholderText.length, // The position for text selection + styles // Pass the styles object here + ); console.log('Current text field:', this.dataDoc[this.fieldKey]); } -- cgit v1.2.3-70-g09d2