diff --git a/projects/ngx-editor/src/lib/modules/menu/image/image.component.ts b/projects/ngx-editor/src/lib/modules/menu/image/image.component.ts index e772ef52..bb7f657d 100644 --- a/projects/ngx-editor/src/lib/modules/menu/image/image.component.ts +++ b/projects/ngx-editor/src/lib/modules/menu/image/image.component.ts @@ -25,7 +25,7 @@ export class ImageComponent implements OnInit, OnDestroy { form = new FormGroup({ src: new FormControl('', [ Validators.required, - Validators.pattern('(https?://)?([\\da-z.-]+)\\.([a-z.]{2,6})[/\\w .-]*/?') + Validators.pattern('(https?://)?([\\da-z.-]+)\\.([a-z.]{2,6})[/\\w .-]*/??([^#\n\r]*)?#?([^\n\r]*)') ]), alt: new FormControl(''), title: new FormControl('') 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 c5bc6aef..720862c8 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 @@ -27,7 +27,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 .-]*/?') + Validators.pattern('(https?://)?([\\da-z.-]+)\\.([a-z.]{2,6})[/\\w .-]*/??([^#\n\r]*)?#?([^\n\r]*)') ]), text: new FormControl('', [Validators.required]), openInNewTab: new FormControl(true)