From 171852260c04ba7aafd789b231d98cdaa2a7dc8d Mon Sep 17 00:00:00 2001
From: laurawilsonri <laura_wilson@brown.edu>
Date: Mon, 25 Feb 2019 19:44:58 -0500
Subject: all but removing preview cursor works

---
 src/client/views/nodes/FormattedTextBox.tsx | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

(limited to 'src/client/views/nodes/FormattedTextBox.tsx')

diff --git a/src/client/views/nodes/FormattedTextBox.tsx b/src/client/views/nodes/FormattedTextBox.tsx
index 4a6560dc9..640c9b208 100644
--- a/src/client/views/nodes/FormattedTextBox.tsx
+++ b/src/client/views/nodes/FormattedTextBox.tsx
@@ -85,10 +85,7 @@ export class FormattedTextBox extends React.Component<FieldViewProps> {
                 history(),
                 keymap({ "Mod-z": undo, "Mod-y": redo }),
                 keymap(baseKeymap),
-                //sets the placeholder text!
-                this.placeholderPlugin(
-                    this.props.doc.GetText(KeyStore.Text, "")
-                )
+                //sets the placeholder text to what's in KeyStore.Text!
             ]
         };
 
@@ -113,6 +110,12 @@ export class FormattedTextBox extends React.Component<FieldViewProps> {
                 this._editorView.updateState(EditorState.fromJSON(config, JSON.parse(field)));
             }
         })
+
+        //if tagged to be selected when created, then select & focus
+        if (this.props.doc.GetNumber(KeyStore.SelectOnLoaded, 0)) {
+            this.props.select();
+            this._editorView!.focus();
+        }
     }
 
     componentWillUnmount() {
@@ -141,9 +144,6 @@ export class FormattedTextBox extends React.Component<FieldViewProps> {
         }
     }
     render() {
-        //if (this.props.doc.GetText(KeyStore.Text, "") !== ;
-
-
         return (<div className="formattedTextBox-cont"
             style={{
                 color: "initial",
-- 
cgit v1.2.3-70-g09d2

