From 5e67aa8ab95e40730acb584cb5ff812fe470608f Mon Sep 17 00:00:00 2001 From: Bob Zeleznik Date: Mon, 27 Jan 2020 17:32:47 -0500 Subject: template fixes --- src/client/views/nodes/FieldView.tsx | 6 +++--- src/client/views/nodes/FormattedTextBox.tsx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/client/views/nodes') diff --git a/src/client/views/nodes/FieldView.tsx b/src/client/views/nodes/FieldView.tsx index 538e433a9..4904ee5c3 100644 --- a/src/client/views/nodes/FieldView.tsx +++ b/src/client/views/nodes/FieldView.tsx @@ -69,9 +69,9 @@ export class FieldView extends React.Component { // if (typeof field === "string") { // return

{field}

; // } - else if (field instanceof RichTextField) { - return ; - } + // else if (field instanceof RichTextField) { + // return ; + // } else if (field instanceof ImageField) { return ; } diff --git a/src/client/views/nodes/FormattedTextBox.tsx b/src/client/views/nodes/FormattedTextBox.tsx index fab267358..5c9f1a754 100644 --- a/src/client/views/nodes/FormattedTextBox.tsx +++ b/src/client/views/nodes/FormattedTextBox.tsx @@ -496,7 +496,7 @@ export class FormattedTextBox extends DocAnnotatableComponent<(FieldViewProps & this._reactionDisposer = reaction( () => { - const field = this.dataDoc ? Cast(this.dataDoc[this.props.fieldKey], RichTextField) : undefined; + const field = Cast(this.props.Document._textTemplate || this.dataDoc[this.props.fieldKey], RichTextField); return field ? field.Data : RichTextUtils.Initialize(); }, incomingValue => { -- cgit v1.2.3-70-g09d2