This issue has been closed in favour of http://blog.wikidot.com/design:24.
This is a design sketch for a new module, Iframe, which makes it easier for people to embed HTML code in their page.
Throughout the whole of Wikidot, people are putting HTML code into code-blocks, and then iframing the Wikidot-generated HTML page.
Iframing HTML gives a result somewhat like embedding the HTML in the Wikidot page, but is secure. Whereas embedded code comes from the same domain as the page, and can thus use (steal or abuse) security cookies or resources, iframed code comes from a different domain (wdfiles.com) and thus has no access to the wikidot.com resources.
Just about every single day on the Wikidot community forums, we get somebody asking how to embed [x] code on [y] page. And every time we tell them:
[[div style="display : none;"]]
[[code]]
[x] code goes here
[[/code]]
[[/div]]
[[iframe /local--code/THIS_PAGE'S_NAME]]
This becomes problematic when they try to “embed” a set of HTML code on the one page, at which point we need to tell them to append /1 or /x to the iframe URL, depending on the index of the code.
This is information that they don't really understand, and nor should they need to.
The Iframe module does the code embedding and iframing in one step:
[[module Iframe attributes...]]
[x] code goes here
[[/module]]
The attributes are where you specify the attributes of a typical [[iframe … ]]. Whatever code that is placed within the module, will be rendered within an iframe, just as though the user were iframing a code block.
Was it implemented ?
EDIT: oups, did not see //I'm closing this issue in favour of http://blog.wikidot.com/design:24//
gerdami - Visit Handbook en Français - Rate this howto:import-simple-excel-tables-into-wikidot up!
I'm closing this issue in favour of http://blog.wikidot.com/design:24.
Portfolio
Huh? This page has zero comments?
You need to edit—save for it to refresh the number of comments. It's annoying =/
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
That's the ListPages cache, I think.
Portfolio
Is this like an embed, or is there a significant difference between the two?
Timothy Foster - @tfAuroratide
Auroratide.com - Go here if you're nerdy like me
The difference between embedding and iframing is quite significant.
Embedding actually injects the code directly into the webpage. Therefore, the embedded code is coming from the domain of the webpage it's embedded in.
Does that make sense?
Embedding poses a risk of code taking over Wikidot, whether iframing does not (the iframed code comes from a different domain).
Oh, I see. Embed puts code on wikidot page, and iframe puts other code of a page on screen.
In that case, this would be highly useful.
Timothy Foster - @tfAuroratide
Auroratide.com - Go here if you're nerdy like me
Here is the code for an embedded YouTube Video:
Which renders this HTML on the Wikidot page:
Now, instead of embedding the YouTube embed code, we can place it in a hidden code block, and iframe the code block.
Here is the code for iframing a YouTube Video:
Which renders this HTML on the Wikidot page:
This section of this comment did display an iframed version of the same code above. It rendered the YouTube video completely identical to the one above.
Unfortunately, we can't demonstrate this anymore because Pieter removed the [[code]] block from this page.
As you can see, the visual output is similar (well, it's identical in this case), but the coding is different.
James I notice you always do a div style="display:none;" then later the closing /div. Is there any reason you do this? It's quicker to type [!--..code..--] comment tags to wrap the code in which is how I always do it.
Rob
Rob Elliott - Strathpeffer, Scotland - Wikidot first line support & community admin team.
Oh, I've been doing that because I thought that commenting out code blocks would mean the code block isn't rendered in wdfiles.com.
Ya learn something new every day :D
Excellent proposal, James. It is true that we see this request over and over and this would save everyone a lot of time.
Portfolio
Agreed.
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
I always thought - the reason to do the store of self written ode on wdfiles is a security factor?
Means - embedding a "prooven" code from a "trusted" site we can embbed ( after some seecurity checks..)
embbedding from an unchecked wikidot.page ( not third party wdfiles) would be dangerous ?
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?
I've lost count of the number of times I've said "you can do this with a codeblock/iframe combination" and then demonstrated it. So a module for this is a very good idea.
Rob
Rob Elliott - Strathpeffer, Scotland - Wikidot first line support & community admin team.
The problem I am facing is that after embeding another page with an Iframe in wikidot, when I click a link in that page the next upcoming page will be out of range and you have to drag it to see its content simply because the height pixel of the first page and second page is different. Is there a way that we can tell (with a code) Wikidot to take all attributes of all pages within that url to take from the url itself and not from the attributes I fill in the Iframe? Is there any such snippet?
If you did not understand me just check http://relationships.wikidot.com/wedding-speeches
When a customer tries to buy, the payment page will be out of range and I have to drag the page to see it. Here the problem is that I can probably miss the customer.
Any snippet please. THX.
I see your problem… it can't be fixed with iframes. You are best to provide a link to the website itself, but open it in a new window so that the user doesn't leave your website.
Use this code on your website to open it up in a new window when they click “Choose what is relevant for you”:
James is right. I don't see the point of trying to embed this site inside an iframe when a simple link will do the trick.
-Ed.
Community Admin