Enveloppe / obsidian-enveloppe

Enveloppe helps you to publish your notes on a GitHub repository from your Obsidian Vault, for free!
https://enveloppe.github.io/
Apache License 2.0
618 stars 38 forks source link

[FR]: Automatically convert YouTube and Twitter link with markdown syntax for external image to proper iframe element #262

Closed ooker777 closed 8 months ago

ooker777 commented 8 months ago

Obsidian allows using the same Markdown syntax as external images to embed YouTube videos and Twitter tweets (official docs):

![](https://www.youtube.com/watch?v=NnTvZWp5Q7o)
![](https://twitter.com/obsdmd/status/1580548874246443010)

Can you automatically convert it to this?

<iframe id="ytplayer" type="text/html" src="https://www.youtube.com/watch?v=NnTvZWp5Q7o" frameborder="0"></iframe>
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">Obsidian 1.0 is live!<br><br>1.0 brings a complete redesign to desktop and mobile.<br><br>Plus, a new way to browse your second brain: tabs. Tabs make it easier to explore many ideas at once.<br><br>Learn more: <a href="https://t.co/b5tuqKrCBc">https://t.co/b5tuqKrCBc</a> <a href="https://t.co/uAgnoRRI3s">pic.twitter.com/uAgnoRRI3s</a></p>&mdash; Obsidian (@obsdmd) <a href="https://twitter.com/obsdmd/status/1580548874246443010?ref_src=twsrc%5Etfw">October 13, 2022</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> 

Here is the regex:

Mara-Li commented 8 months ago

You can using regex content replacement.

ooker777 commented 8 months ago

Yes, but why not make it easier for users by having this as a feature?

Mara-Li commented 8 months ago

No. You can share the settings and let user get it.

ooker777 commented 1 month ago

can you explain more on why this shouldn't be a feature? Or how about adding this to the docs?