[TW5] iframe wormhole?

90 views
Skip to first unread message

Mat

unread,
Dec 29, 2014, 7:07:39 AM12/29/14
to tiddly...@googlegroups.com
First a description of what I hope for. Very cool actually: imagine an iframe, in your TW, that you can dragn'drop import links from. This iframe could contain an aggregated collection of tiddlerlinks from many different TWs. For instance an iframe with "My top 10 plugins" with nice CSS so it looks like an app store! Poeople who get this iframe really get a live peekhole to put in their own TW's. Such an iframe (the html code for it) could be posted e.g here as plain text, or if it is your "top list" then it could be hosted on your public TW for others to import as normal.

As we know, iframes don't allow for this - but here are two things (so please read 'til the end) I've found that just might...

1)
Insert the following into a tiddler:

<iframe src="http://www.tiddlywiki.com" width="570" height="600"></iframe>

Inside iframe, scroll up to see the sidebar. Click+drag tiddler HelloThere as an attempt to import it into your local TW. You get a js error... BUT, at least in my browser, you also get a redirection to, well, hellothere.com ! (If you have unsaved stuff in your tw you'll first get the usual "are you sure you want to leave" alert).

Could this be a wormhole in the iframe? Or, at least something we can exploit to be able to import stuff, by drag n'drop tiddlertitles from iframes.

It does appear to actually be the link dragged since you really can transfer it to the brower address field and you do see the actual title being dragged.


2)
Now, if the above wormhole is not a viable route after all, then I'm wondering if something like what is outlined here (iframes and postMessage() command) could be used? Perhaps if there was (is?) some identifier to all links in a TW page, i.e built into core, so that you know that you can always find the url(?) for a tiddler on any TW as:

url to import = src (as stated in iframe) + identifier + tiddlertitle

If that makes no sense, you're probably right, but what I'm after is some way to "convert" whatever it is that IS dragged out of the iframe into the form of an actually importable link.

Thank you!

<:-)

Tobias Beer

unread,
Dec 31, 2014, 7:04:57 AM12/31/14
to tiddly...@googlegroups.com
Why iframes? Have two windows and you're set.

Best wishes, Tobias.

Jeremy Ruston

unread,
Dec 31, 2014, 12:52:40 PM12/31/14
to TiddlyWikiDev
> BUT, at least in my browser, you also get a redirection to, well, hellothere.com ! (If you have unsaved stuff in your tw you'll first get the usual "are you sure you want to leave" alert). 

What browser are you using?

The error that Firefox gives is "SecurityError: The operation is insecure.", so I'm guessing that there is some subtle restriction on drag-and-drop across iframe boundaries.

What problem are you trying to solve with this idea of dragging from an iframe? It does seem as though dragging between separate browser windows is more reliable and intuitive.

Best wishes

Jeremy


On Wed, Dec 31, 2014 at 12:04 PM, Tobias Beer <beert...@gmail.com> wrote:
Why iframes? Have two windows and you're set.

Best wishes, Tobias.

--
You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywikide...@googlegroups.com.
To post to this group, send email to tiddly...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywikidev.
For more options, visit https://groups.google.com/d/optout.



--
Jeremy Ruston
mailto:jeremy...@gmail.com

Mat

unread,
Jan 1, 2015, 7:14:41 AM1/1/15
to tiddly...@googlegroups.com
@Jeremy and @Tobias
:
Why iframes? Have two windows and you're set.

Ok, the idea is really to use it as a social tool by being able to share an iframe (e.g by posting it here or by having someone import it from their site) so that people get a live channel, possibly for communication (more below), in their own TWs. People should not have to browse to a site or use separate windows, they should access this via their own TWs.

Hadn't planned on detailing this quite yet, which was sparked in a discussion with Tobias some time ago, but here's an illustration of the concept. See the attached image. Imagine having this, in an iframe (or other method), appear in your own TW:
 

 


A live list that you can drag'n drop from. The topic could be TW stuff (themes, plugins, ...) but also any other matter (tiddlers with recipes, musicvids,..). All allowing the viewer to drag'n drop import into their own TW.  And such an list could (hopefully) also be a list of other iframe tiddlers so that you could make "lists of lists".

Such lists could be manually compiled or aggregated automatically using something like Erwans Community Search (that I ask about here - I link to that thread because it is also part of the greater idea behind these iframe questions). This would mean a user can also add content to the lists. Say you create a new plugin and e.g tag it with "Plugin", this get's pulled into a Community search filtering out plugins and is added to such a plugin list, which you see in your iframe tiddler titled "latest plugins" in your own TW. Pretty darn cool.

More niche subjects ("rock'n roll music") would mean a kind of formation of "interest groups" with unofficial content.. "Unofficial" in the sense that tw.com does not have to be involved (but if such an "iframe tiddler" became good or popular enough, it could then be included on tw.com and become official).

So, for it to make sense I really think it relies on being able to drag the lnik straight out of this iframe (or whatever the solution is). The lists should be contained in your own local tiddler for convenience and you can add your own meta data to them.

Does this make sense?Sorry if my explanation was more elaborate than the question ("Why iframes?")


<:-)

Mat

unread,
Jan 1, 2015, 12:31:15 PM1/1/15
to tiddly...@googlegroups.com, jeremy...@gmail.com
Jeremy Ruston wrote:
What browser are you using?

FFlatest. I just tried this with IE and notice the dragging does not seem to give anything. In FF you really are dragging something.

Further, I just discovered that if you have this iframe:

<iframe src="http://tiddlywiki.com/alltiddlers.html" width="600" height="400"></iframe>

...and you locate a link to e.g HelloThere and drag to dropzone, it will not only open tw.com/alltiddlers, but it will open tw.com/alltiddlers#HelloThere
(still leaving your own tw tho).


BUT I just realized something that is pretty close that I think works!

If a site is hosting a tiddler that looke e.g lik the above image, the links could really be exporting links! I,e  the feature you find in the toolbar. Instead of "importing" locally, you really export remotely, and save the .tid into your local nodejs folder - effectively importing that plugin or whatever it is. Does require nodejs, I guess, which I'm currently not using so I haven't tested it other than confirmning that export does work from inside an iframe. What do you say, is this a workable idea?


<:-)
Reply all
Reply to author
Forward
0 new messages