Hacker News new | ask | show | jobs
by arek_nawo 1098 days ago
Yeah, generic embeds aren't allowed - only CodePen, CodeSandbox, and YouTube. In Vrite, all the embeds are actually processed separately when auto-publishing to different platforms (e.g. Medium, Dev.to, Hashnode), that's why I don't want to allow generic iframes.

That said, I do plan to add some more embeds to the core (e.g. Twitter) but others will likely be supported through custom content blocks and extensions.

That said, definitely report any feedback or feature request you have (if not as an issue then possibly as a discussion).

2 comments

Ok, makes sense!

> That said, I do plan to add some more embeds to the core (e.g. Twitter) but others will likely be supported through custom content blocks and extensions.

> That said, definitely report any feedback or feature request you have (if not as an issue then possibly as a discussion).

I’ll open a discussion on the repo then! Thanks a lot for taking the time to answer!

interesting, I checked out the md, and it looks like you don't capture your embeds there, so the youtube embed is just gone from the markdown... I would expect it to at least show up as a link.
The main output is JSON ProseMirror format. Other formats are processed from this JSON using Transformers and Vrite SDK: https://github.com/vriteio/vrite/tree/main/packages/sdk/java...

In the GFM transformer I try to follow GitHub Flavored Markdown spec, which technically doesn't support embeds. Since I didn't find any "common" syntax to use for the embeds, I just left them out. They're still there in JSON and HTML outputs.

That's one of the drawbacks of MD. That said, I plan to add an option like Markdoc, which has clearly defined spec for implementing custom blocks like embeds.

That said, for now, if you sign up for the full Vrite CMS, you can create a custom Transformer and process the output so that embeds are included in your desired format. That's what I'm doing for auto-publishing extensions for platforms like Dev.to and Hashnode. I don't know what your use-case is, but I thought it's worth noting.