Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you embed an iframe into markdown

Tags:

markdown

I would like to implement Toast UI. However, there is a requirement to be able to embed an iframe into the output.

How do you put an iframe into a markdown script?

like image 974
P Hemans Avatar asked Feb 27 '19 23:02

P Hemans


People also ask

Can you embed iframe in markdown?

You can use any markdown implementation, including MarkdownIt, but first you have to make it insecure first, by allowing HTML. Then, use DOMPurify, but allow <iframe> tag, including related attributes. Then, sanitize insecure iframes later.

How do I embed a webpage in markdown?

You can't use embeds on markdown, the closest thing you could do is take a snapshot of the site and use an image link.

How do I embed an iframe?

To embed an iframe in a content page, select Interactive layout, choose the HTML block and paste the iframe code there. You can adjust the iframe width and height properties. To embed an iframe using the Old (Classic) editor, click on the Embed Media icon and paste the code in the appropriate field.

Can you embed with markdown?

Markdown supports HTML, so if you need to, say, embed a YouTube video, you can just copy and paste the embed code from them, drop it into a Markdown document, and you should be good to go.


1 Answers

An <iframe> is just an HTML tag, and Markdown supports inline HTML. You should be able to just use it.

(And this is a bit pedantic, but Markdown files aren't "scripts". Markdown is a markup language, not a programming language.)

like image 160
Chris Avatar answered Sep 22 '22 23:09

Chris