From 573073a99c98136ed3f83e7d965b496fb2b80611 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..ab1be8b 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 {