aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/FormattedTextBox.tsx
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-04-30 19:48:36 -0400
committerBob Zeleznik <zzzman@gmail.com>2019-04-30 19:48:36 -0400
commit3ed9fbefe1428c1493027122791ccbbe1b2fe1d1 (patch)
treeadac80637e3824bcb8f54bca5929c1175fdabb95 /src/client/views/nodes/FormattedTextBox.tsx
parent7d4a4b25459b66568880528cd3776b6ff9cbcf9f (diff)
fixed link document
Diffstat (limited to 'src/client/views/nodes/FormattedTextBox.tsx')
-rw-r--r--src/client/views/nodes/FormattedTextBox.tsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/views/nodes/FormattedTextBox.tsx b/src/client/views/nodes/FormattedTextBox.tsx
index 9c6f95fc4..fe9696062 100644
--- a/src/client/views/nodes/FormattedTextBox.tsx
+++ b/src/client/views/nodes/FormattedTextBox.tsx
@@ -144,8 +144,8 @@ export class FormattedTextBox extends DocComponent<(FieldViewProps & FormattedTe
private setupEditor(config: any, doc?: Doc) {
let field = doc ? Cast(doc[this.props.fieldKey], RichTextField) : undefined;
- if (this._ref.current) {
- this._editorView = new EditorView(this._ref.current, {
+ if (this._proseRef.current) {
+ this._editorView = new EditorView(this._proseRef.current, {
state: field && field.Data ? EditorState.fromJSON(config, JSON.parse(field.Data)) : EditorState.create(config),
dispatchTransaction: this.dispatchTransaction
});
@@ -195,8 +195,8 @@ export class FormattedTextBox extends DocComponent<(FieldViewProps & FormattedTe
if (!this.props.isOverlay) {
MainOverlayTextBox.Instance.SetTextDoc(this.props.Document, this.props.fieldKey, this._ref.current!, this.props.ScreenToLocalTransform);
} else {
- if (this._ref.current) {
- this._ref.current.scrollTop = MainOverlayTextBox.Instance.TextScroll;
+ if (this._proseRef.current) {
+ this._proseRef.current.scrollTop = MainOverlayTextBox.Instance.TextScroll;
}
}
}