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?
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.
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.
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.
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.
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.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With