aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/FormattedTextBox.tsx
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-09-13 00:55:39 -0400
committerBob Zeleznik <zzzman@gmail.com>2019-09-13 00:55:39 -0400
commite241e61d6521ff5d63de1292f2b4269493f5d7cc (patch)
treec39dc8619e637654cc8937be6b3f0ee0d7f8df96 /src/client/views/nodes/FormattedTextBox.tsx
parent26eed39d2fe140e6bfc3d572bd1aa4717ab52926 (diff)
added "publish" option to convert a document to a recognizable id
Diffstat (limited to 'src/client/views/nodes/FormattedTextBox.tsx')
-rw-r--r--src/client/views/nodes/FormattedTextBox.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/nodes/FormattedTextBox.tsx b/src/client/views/nodes/FormattedTextBox.tsx
index c07461e13..04d24fe8c 100644
--- a/src/client/views/nodes/FormattedTextBox.tsx
+++ b/src/client/views/nodes/FormattedTextBox.tsx
@@ -293,7 +293,7 @@ export class FormattedTextBox extends DocComponent<(FieldViewProps & FormattedTe
}
recordKeyHandler = (e: KeyboardEvent) => {
- if (this.props.Document === SelectionManager.SelectedDocuments()[0].props.Document) {
+ if (SelectionManager.SelectedDocuments().length && this.props.Document === SelectionManager.SelectedDocuments()[0].props.Document) {
if (e.key === "R" && e.altKey) {
e.stopPropagation();
e.preventDefault();
@@ -473,7 +473,7 @@ export class FormattedTextBox extends DocComponent<(FieldViewProps & FormattedTe
this._fontFamily = rules.font;
this._fontSize = rules.size;
setTimeout(() => {
- if (this._editorView!.state.doc.childCount) {
+ if (this._editorView!.state.doc.childCount && this._proseRef) {
let tr = this._editorView!.state.tr;
let n = new NodeSelection(this._editorView!.state.doc.resolve(0));
if (this._editorView!.state.doc.textContent === "") {