From ccf4d9438012ed7d2e19e4a55166f1bc6ce3e952 Mon Sep 17 00:00:00 2001 From: bobzel Date: Fri, 7 Mar 2025 10:20:19 -0500 Subject: cleaned up RTF creation w/ styles. fixed scripting compile bug when unused functions were considered not found. --- src/client/views/nodes/formattedText/DailyJournal.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/client/views/nodes/formattedText') diff --git a/src/client/views/nodes/formattedText/DailyJournal.tsx b/src/client/views/nodes/formattedText/DailyJournal.tsx index 42c559da4..25bb44924 100644 --- a/src/client/views/nodes/formattedText/DailyJournal.tsx +++ b/src/client/views/nodes/formattedText/DailyJournal.tsx @@ -56,18 +56,18 @@ export class DailyJournal extends ViewBoxAnnotatableComponent() console.log('Checking if dataDoc has text field...'); - const styles = { - bold: true, // Make the journal date bold + 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 + 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.textToRtfFormatting( + this.dataDoc[this.fieldKey] = RichTextField.textToRtf( initialText, undefined, // No image DocId - placeholderText.length, // The position for text selection - styles // Pass the styles object here + styles, // Pass the styles object here + placeholderText.length // The position for text selection ); console.log('Current text field:', this.dataDoc[this.fieldKey]); -- cgit v1.2.3-70-g09d2