GitHub user sfirke closed the discussion with a comment: Embedded dashoard with external iframe in Superset dashboard
There are three pieces to adding an iFrame content to your Superset dashboard. **The Markdown** The markdown code would look like this: ``` <iframe width="640px" height="1100px" src="https://forms.microsoft.com/g/xkemDFSjemdD?embed=true" frameborder="0" marginwidth="0" marginheight="0" style="border: none; max-width:100%" scrolling="no"> </iframe> ``` Of course change the `src` URL as needed, I'm embedding a Microsoft form. **Change to your Talisman CSP** You'll need a line like this in your `TALISMAN_CONFIG`: ``` "frame-src": ["<your-domain>", "*.microsoft.com"], ``` Again, change from microsoft.com to your own URL. **Change to your HTML Sanitization** In your config: ``` HTML_SANITIZATION = True HTML_SANITIZATION_SCHEMA_EXTENSIONS = { "attributes": { "*": ["style", "className", "src", "width", "height", "frameborder", "marginwidth", "marginheight", "scrolling", "target"], # this enables basic CSS styling for Handlebars text charts and iFrame embeds for feedback forms }, "tagNames": ["style", "iframe"], } ``` You might not need all of the attributes I listed above, those are from my config and I'm not sure which were for embedding and which were for Handlebars styling. GitHub link: https://github.com/apache/superset/discussions/33129#discussioncomment-12844666 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
