FHachez / obsidian-convert-url-to-iframe

Plugin for Obsidian.md to convert a selected URL to an iframe.
200 stars 17 forks source link

Does not recognize uncommon top level domain (TLD) #57

Open Graybound opened 1 year ago

Graybound commented 1 year ago

It seems that if ".com", ".org", ".net" etc. is not in the url the plugin will not recognize it as a url.

It did not recognize there was a url selected when I tried to add a note about configuring the 1.1.1.1 DNS and add a iframe link to https://1.1.1.1/dns/. I noticed that if I put .com in the url like: https://1.1.1.1 .com /dns/ it would recognize there was a url. Unfortunately that is not a valid domain. A workaround I am doing is to put the ".com" make the iFrame and then changing it to the correct url after inserting the iframe.

Is it possible to set the recognition to validate based if the selected text contains "http" which would cover 99% of URLs?

For details I am experiencing this on: 2020 M1 MacBook Air running MacOS Ventura 13.4 (22F66) Convert URL to iframe v0.5.0 Obsidian v1.3.5

dcolli23 commented 1 year ago

This would be wonderful. I embed local HTML files (that I produced, so I know they're safe) in my journal and being able to recognize http:, file:, or app: prefixes would make this plugin a dream.