support (some) embedded html on prose.sh

I have a bunch of blog posts with embedded html <video> tags, like this:

<video width="640" height="360" controls autoplay loop muted>
  <source src="https://images.rtijn.org/x100f-modes.m4v" type="video/mp4">
  Your browser does not support the video tag.

AFAIK markdown does not have a native way to display video inline (although some markdown processors seem to support video in ![](). I would love it if inline video were supported.

Assigned to
1 year, 10 months ago
1 year, 10 months ago
feature prose.sh

~erock 1 year, 10 months ago

We definitely want to support embedding videos. We use goldmark under the hood for markdown rendering so we could look into https://github.com/13rac1/goldmark-embed

I'd like also support video embeds from other places besides youtube so we might need to extend that project.

~bentsai 1 year, 10 months ago

Sometimes I embed iframes—in particular, from kinopio, like this:

<div class="kinopio-embed" style="height: 420px; width: 100%;">
  <iframe src="https://kinopio.club/embed/?spaceId=DECfJmIQTgIdAsLl7R4uZ&zoom=100" style="height: 100%; width: 100%; border: 0; border-radius: 5px;">

Could that be supported?

~erock 1 year, 10 months ago

Hmm, we can definitely investigate it, but we also want to be careful with iframes since they get abused quite a bit. One of the goals of prose is to ensure no javascript is run. Having an iframe could inject js which I think subverts expectations.

~bentsai 1 year, 10 months ago

Yes, javascript would get run, so I understand why you would not allow iframes. Thanks!

~bentsai 1 year, 10 months ago

I tried embedding a tweet using the code provided by twitter.com. I realize the javascript will get stripped, but for some reason, nothing is rendering. Here's the code:

<blockquote class="twitter-tweet" data-dnt="true"><p lang="en" dir="ltr">I’d add that everyone *does* design, so let’s equip them with all the tools and support they (I) need <a href="https://t.co/Y53MUWwKDB">https://t.co/Y53MUWwKDB</a></p>&mdash; Ben Tsai (@bentsai) <a href="https://twitter.com/bentsai/status/1554814571944284161?ref_src=twsrc%5Etfw">August 3, 2022</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

~erock 1 year, 10 months ago

We don’t support any html inside markdown atm.

~antoniomika REPORTED IMPLEMENTED 1 year, 10 months ago

Register here or Log in to comment, or comment via email.