From b9aec158b7847d2cf525263965000618db7dc512 Mon Sep 17 00:00:00 2001 From: Sebastian Schmailzl <37831507+schmoizz@users.noreply.github.com> Date: Thu, 21 Jul 2022 12:57:44 +0200 Subject: [PATCH] feat: add support to mailto links (#423) Co-authored-by: Schmailzl, Sebastian --- projects/ngx-editor/src/lib/modules/menu/link/link.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/ngx-editor/src/lib/modules/menu/link/link.component.ts b/projects/ngx-editor/src/lib/modules/menu/link/link.component.ts index 2c11798f..a1a62421 100644 --- a/projects/ngx-editor/src/lib/modules/menu/link/link.component.ts +++ b/projects/ngx-editor/src/lib/modules/menu/link/link.component.ts @@ -28,7 +28,7 @@ export class LinkComponent implements OnInit, OnDestroy { form = new FormGroup({ href: new FormControl('', [ Validators.required, - Validators.pattern('(https?://)?([\\da-z.-]+)\\.([a-z.]{2,6})[/\\w .-]*/??([^#\n\r]*)?#?([^\n\r]*)'), + Validators.pattern('(https?://)?([\\da-z.-]+)\\.([a-z.]{2,6})[/\\w .-]*/??([^#\n\r]*)?#?([^\n\r]*)|(mailto:.*[@].*)'), ]), text: new FormControl('', [Validators.required]), openInNewTab: new FormControl(true),