From 517ea711ae15e2f670c2734d784a2da2b9afa89d Mon Sep 17 00:00:00 2001 From: "Schmailzl, Sebastian" Date: Thu, 21 Jul 2022 09:57:49 +0200 Subject: [PATCH] feat: added mailto support to Link Component --- 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),