This is a design sketch for embedding HTML into Wikidot pages. The idea is based on the design of an Iframe module by James Kanjo.
We propose a syntax extension:
[[html ...arguments...]]
<h1>
My example header
</h1>
<p>
My awesome paragraph.
</p>
[[/html]]
This creates an HTML page on a separate server, creates an iframe to embed that HTML page into the current page, and adds JavaScript that automatically resizes the iframe to match the HTML size.
This is a secure sandboxing of the HTML: it cannot access the encapsulating page nor can it use the session's security information.
CSS inheritation is not what you want (unless done explicitly).
For example many styles set width of body to 900px or so. As body element is added to the HTML, the iframe content would be also styled that way. I believe we don't want to do this.
Nice thing about this (as mention implementation details) is that we can use variables (from ListPages and _templates) in such blocks like this:
Piotr Gabryjeluk
visit my blog
But as I think more about this, I believe there is a set of properties that we want to SET like:
This can be done by marking html tag with id="html-iframe" and setting those properties in base/style.css. The rest of the properties can be then safely inherited from the wiki style. This would be the most flexible solution, as you can also overwrite #html-iframe body properties in custom themes to create some nice effects.
Piotr Gabryjeluk
visit my blog
There is no need to wrap content in an <html> tag. We should add all required HTML structure nodes automatically, even add some JS or CSS files, e.g. for automatic iframe resizing or to match the style of the content with the given site.
A real example would be then:
Michał Frąckowiak @ Wikidot Inc.
Visit my blog at michalf.me
Mmmmmm……. dunno about that.
What if you have an attribute for CSS? inherit_css="true"
I can think of several cases where I wouldn't want the CSS to be inherited.
OK, makes sense.
Portfolio
This is much better… it even follows the KISS principle!