From 0694bf0bec5da94d800affbf60b79a16c7d4d0e1 Mon Sep 17 00:00:00 2001 From: Hufe921 Date: Wed, 1 Mar 2023 21:08:49 +0800 Subject: [PATCH] fix:cannot paste html at the end of the control #133 --- src/editor/core/draw/Draw.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/editor/core/draw/Draw.ts b/src/editor/core/draw/Draw.ts index ab9160c..377db26 100644 --- a/src/editor/core/draw/Draw.ts +++ b/src/editor/core/draw/Draw.ts @@ -326,7 +326,10 @@ export class Draw { public insertElementList(payload: IElement[]) { if (!payload.length) return const activeControl = this.control.getActiveControl() - if (activeControl) return + if (activeControl) { + const element = activeControl.getElement() + if (element.controlComponent !== ControlComponent.POSTFIX) return + } const isPartRangeInControlOutside = this.control.isPartRangeInControlOutside() if (isPartRangeInControlOutside) return const { startIndex, endIndex } = this.range.getRange()