sibiraj-s / ngx-editor

🖋️ Rich Text Editor for angular using ProseMirror
https://sibiraj-s.github.io/ngx-editor/
MIT License
423 stars 182 forks source link

[Bug]: Invalid image url #517

Closed enviniom closed 6 days ago

enviniom commented 2 months ago

What happened?

I'm testing my Angular App in my local system, and upload images to my backend in local, and I'm serving them, but when I use the local url (like https://localhost:7241/files/Services/ImagesHelpCatalog/Svc-2-1708307343.jpg) for the image and try to insert in the editor, the validator does not accept this url. Maybe is the pattern doesn't allow a port in url.

Version

16.0.1

Angular Version

v17.1.0

What browsers are you seeing the problem on?

Chrome

Link to reproduce

No response

Relevant log output

No response

Willing to submit a PR?

None

sibiraj-s commented 2 months ago

You can find the regex here.

https://github.com/sibiraj-s/ngx-editor/blob/master/projects/ngx-editor/src/lib/modules/menu/image/image.component.ts#L28

Yes port could be the issue. Usually inserting local images is not the use case, it is recommended to upload the image and insert the actual URL.