aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/formattedText
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2021-03-06 15:49:22 -0500
committerbobzel <zzzman@gmail.com>2021-03-06 15:49:22 -0500
commitea0ec26d362d6794b9020a60b55cf6c38368aef4 (patch)
tree8a364e6dc1c1a0c90258526528b0bacc009bb86e /src/client/views/nodes/formattedText
parentb56d4f3c8774e059ed748dd4f831c1c743c7e40a (diff)
cleaned up a little bit in doc decorations.
Diffstat (limited to 'src/client/views/nodes/formattedText')
-rw-r--r--src/client/views/nodes/formattedText/EquationView.tsx2
-rw-r--r--src/client/views/nodes/formattedText/RichTextRules.ts3
2 files changed, 2 insertions, 3 deletions
diff --git a/src/client/views/nodes/formattedText/EquationView.tsx b/src/client/views/nodes/formattedText/EquationView.tsx
index 15f15a11e..508500ab6 100644
--- a/src/client/views/nodes/formattedText/EquationView.tsx
+++ b/src/client/views/nodes/formattedText/EquationView.tsx
@@ -29,7 +29,7 @@ export class EquationView {
(this as any).dom = this._fieldWrapper;
}
_editor: EquationEditor | undefined;
- setEditor = (editor?: EquationEditor) => { this._editor = editor; }
+ setEditor = (editor?: EquationEditor) => this._editor = editor;
destroy() { ReactDOM.unmountComponentAtNode(this._fieldWrapper); }
selectNode() { this._editor?.mathField.focus(); }
deselectNode() { }
diff --git a/src/client/views/nodes/formattedText/RichTextRules.ts b/src/client/views/nodes/formattedText/RichTextRules.ts
index e5d924f42..4b9b78211 100644
--- a/src/client/views/nodes/formattedText/RichTextRules.ts
+++ b/src/client/views/nodes/formattedText/RichTextRules.ts
@@ -316,8 +316,7 @@ export class RichTextRules {
if (!fieldKey && !docid) return state.tr;
docid && DocServer.GetRefField(docid).then(docx => {
if (!(docx instanceof Doc && docx)) {
- const docx = Docs.Create.FreeformDocument([], { title: rawdocid, _width: 500, _height: 500 }, docid);
- DocUtils.Publish(docx, docid, returnFalse, returnFalse);
+ Docs.Create.FreeformDocument([], { title: rawdocid, _width: 500, _height: 500 }, docid);
}
});
const node = (state.doc.resolve(start) as any).nodeAfter;