From eb3a25741df21779c9922bf9e887a030cbdd896d Mon Sep 17 00:00:00 2001 From: Sergii Volianskyi <55977702+svolianskyi@users.noreply.github.com> Date: Fri, 10 Jan 2025 14:48:29 +0200 Subject: [PATCH] Fix issue with text/plain insertion --- projects/ngx-wig/src/lib/ngx-wig.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/ngx-wig/src/lib/ngx-wig.component.ts b/projects/ngx-wig/src/lib/ngx-wig.component.ts index 66c1e97..28b4b2d 100644 --- a/projects/ngx-wig/src/lib/ngx-wig.component.ts +++ b/projects/ngx-wig/src/lib/ngx-wig.component.ts @@ -159,7 +159,7 @@ export class NgxWigComponent onPaste(event: ClipboardEvent) { event.preventDefault(); - const text = event.clipboardData?.getData('text/html') ?? ''; + const text = event.clipboardData?.getData('text/html') || event.clipboardData?.getData('text/plain') ?? ''; if (this._filterService){ this.pasteHtmlAtCaret(this._filterService.filter(text)); } else {