From 75e76f1ec098ea9cbcd76432002da1bb73d74eba Mon Sep 17 00:00:00 2001 From: bobzel Date: Thu, 10 Apr 2025 14:44:07 -0400 Subject: fixed removing predictive prompt. fixed first letter typed after predictive prompt --- .../views/nodes/formattedText/FormattedTextBox.tsx | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'src/client/views/nodes/formattedText/FormattedTextBox.tsx') diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx index a45b8a488..bef999e6d 100644 --- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx +++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx @@ -78,7 +78,7 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent new FormattedTextBoxComment() }), + ...(plugs ?? []), ], }; } @@ -140,6 +141,7 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent { + const editorView = this.EditorView; + if (editorView) { + this._userPlugins.push(plugin); + const newState = editorView.state.reconfigure({ + plugins: [...editorView.state.plugins, plugin], + }); + editorView.updateState(newState); + } + }; + @computed get tagsHeight() { return this.DocumentView?.().showTags ? Math.max(0, 20 - Math.max(this._props.yPadding ?? 0, NumCast(this.layoutDoc._yMargin))) * this.ScreenToLocalBoxXf().Scale : 0; } @@ -1403,7 +1416,7 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent