aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/formattedText/FormattedTextBox.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-01-28 23:46:18 -0500
committerbobzel <zzzman@gmail.com>2024-01-28 23:46:18 -0500
commit1a32884f5084d9c39190e44bd9331e94590322e5 (patch)
treecb01f5028d696664cbae66567bfe9fb550f423ff /src/client/views/nodes/formattedText/FormattedTextBox.tsx
parentb8288a83669f1c6690082a18c7f4d14a76e31586 (diff)
fixed inking when in panToScroll mode. fixed text templates to restore default text when all text is deleted. changed code blocks to stay in code black mode after a carriage return (unless its a hard break, e.g. shift+carriage return). added a ^@paint input rule to turn text documents into paint func docs.
Diffstat (limited to 'src/client/views/nodes/formattedText/FormattedTextBox.tsx')
-rw-r--r--src/client/views/nodes/formattedText/FormattedTextBox.tsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx
index 6f9c2893e..0b857794b 100644
--- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx
+++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx
@@ -368,7 +368,7 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<FieldViewProps
this._applyingChange = this.fieldKey;
const textChange = newText !== prevData?.Text;
textChange && (dataDoc[this.fieldKey + '_modificationDate'] = new DateField(new Date(Date.now())));
- if ((!prevData && !protoData) || newText || (!newText && !templateData)) {
+ if ((!prevData && !protoData) || newText || (!newText && !protoData)) {
// if no template, or there's text that didn't come from the layout template, write it to the document. (if this is driven by a template, then this overwrites the template text which is intended)
if (force || ((this._finishingLink || this._props.isContentActive() || this._inDrop) && removeSelection(newJson) !== removeSelection(prevData?.Data))) {
const numstring = NumCast(dataDoc[this.fieldKey], null);