From ea0ec26d362d6794b9020a60b55cf6c38368aef4 Mon Sep 17 00:00:00 2001 From: bobzel Date: Sat, 6 Mar 2021 15:49:22 -0500 Subject: cleaned up a little bit in doc decorations. --- src/client/views/nodes/formattedText/EquationView.tsx | 2 +- src/client/views/nodes/formattedText/RichTextRules.ts | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'src/client/views/nodes/formattedText') 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; -- cgit v1.2.3-70-g09d2