aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/formattedText/DailyJournal.tsx
diff options
context:
space:
mode:
authoraaravkumar <aarav.kumar1510@gmail.com>2025-03-07 00:13:01 -0500
committeraaravkumar <aarav.kumar1510@gmail.com>2025-03-07 00:13:01 -0500
commit696ae072b1f00d616450d76bc016aebcc1c102fc (patch)
tree97010a729b063ffe39b3b17438b5bf99d5859100 /src/client/views/nodes/formattedText/DailyJournal.tsx
parent1ab6f6c87b746e0c2898694216db50d5faadf7f5 (diff)
attempted adding formatting
Diffstat (limited to 'src/client/views/nodes/formattedText/DailyJournal.tsx')
-rw-r--r--src/client/views/nodes/formattedText/DailyJournal.tsx15
1 files changed, 13 insertions, 2 deletions
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<FieldViewProps>()
month: 'long',
day: 'numeric',
});
- console.log('📆 getFormattedDate():', date);
+ console.log('getFormattedDate():', date);
return date;
}
@@ -56,8 +56,19 @@ export class DailyJournal extends ViewBoxAnnotatableComponent<FieldViewProps>()
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]);
}