diff options
author | laurawilsonri <laura_wilson@brown.edu> | 2019-02-25 19:44:58 -0500 |
---|---|---|
committer | laurawilsonri <laura_wilson@brown.edu> | 2019-02-25 19:44:58 -0500 |
commit | 171852260c04ba7aafd789b231d98cdaa2a7dc8d (patch) | |
tree | 53ca1cf310bc099e4cbad07adc2efaa9dc3d12c9 /src/client/views/nodes/FormattedTextBox.tsx | |
parent | 03b35e3d6346800821bb830a7c102dede74647fe (diff) |
all but removing preview cursor works
Diffstat (limited to 'src/client/views/nodes/FormattedTextBox.tsx')
-rw-r--r-- | src/client/views/nodes/FormattedTextBox.tsx | 14 |
1 files changed, 7 insertions, 7 deletions
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", |