[TW5] Feature Request: FramedLinksPlugin for TW5

187 views
Skip to first unread message

TiddlyWiker

unread,
Jul 19, 2015, 3:24:54 AM7/19/15
to tiddl...@googlegroups.com
I have found the FramedLinksPlugin in tw classic very useful.

Clicking an external link opens an IFRAME following the link instead of
opening a new tab/window.

http://www.tiddlytools.com/#FramedLinksPlugin

Is it possible to have the same plugin or a similar one for
TW5?

Eric Shulman

unread,
Jul 19, 2015, 4:05:57 PM7/19/15
to tiddl...@googlegroups.com
You can create a simple "framed link" using TW5 native syntax, without any plugin.

First, define the following TW5 macro:
\define framedlink(url)
<$button popup="$:/temp/framedlink/$url$" class="tc-btn-invisible">$url$</$button>
<$reveal type="nomatch" text="" state="$:/
temp/framedlink/$url$">
<iframe src="
$url$" width="100%" height="600px"></iframe>
</$reveal>
\end

Then, invoke it like this:
   <<framedlink "http://tiddlywiki.com">> 

This creates a $button that, when clicked, $reveals the iframe.  Clicking the $button text again hides the iframe.

enjoy,
-e
Eric Shulman
ELS Design Studios
TiddlyTools - "Small Tools for Big Ideas!"
InsideTiddlyWiki: The Missing Manuals

YOUR DONATIONS ARE VERY IMPORTANT!
HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY "TIP JAR"...

Professional TiddlyWiki Consulting Services...
Analysis, Design, and Custom Solutions:

TiddlyWiker

unread,
Jul 20, 2015, 5:05:48 AM7/20/15
to tiddl...@googlegroups.com
Dear Eric,

Thanks a lot!  It worked like a charm.

I do have one question though.

It seems the framedlink
in tiddlywiki classic and also here in TW5 both work for most urls.
but for some they don't work. for example:

http://www.reddit.com/r/worldnews/

when I put it straight into a tiddler it
opens ok in the browser window.

But using the macro and the framed link

<<framedlink "http://www.reddit.com/r/worldnews/">>

it doesn't open in the tiddler.

The same thing happens for the tiddlywiki classic
version.

Is it some security issue?

Regards,

Tiddlywiker

 
 

Eric Shulman

unread,
Jul 20, 2015, 11:32:29 AM7/20/15
to tiddl...@googlegroups.com
On Monday, July 20, 2015 at 2:05:48 AM UTC-7, TiddlyWiker wrote:
It seems the framedlink
in tiddlywiki classic and also here in TW5 both work for most urls.
but for some they don't work. for example:
http://www.reddit.com/r/worldnews/
when I put it straight into a tiddler it
opens ok in the browser window.
But using the macro and the framed link
<<framedlink "http://www.reddit.com/r/worldnews/">>
it doesn't open in the tiddler.
The same thing happens for the tiddlywiki classic
version.
Is it some security issue?

Some sites are written to specifically detect and exclude display in a iframe.  This is most common for "portal" sites, search engines, and media/news sites that monetize your eyeballs with banner ads and such.  They don't want their site to be embedded on someone else's page because then they can't control the overall viewing experience, and thus can't ensure the context in which their advertiser's content will appear.

-e

TiddlyWiker

unread,
May 25, 2016, 5:04:46 AM5/25/16
to TiddlyWiki


On Sunday, July 19, 2015 at 10:05:57 PM UTC+2, Eric Shulman wrote:

another question.


In the twc version of framedlinks If you have a number of links in the same tiddler then you can open and close them independently. But with the TW5 version that you offered if you have a number of links on the same tiddler opening and closing one opens and closes them all

Is there a way to have the same functionality in the TW5 version as in the twc classic version. Or am I missing something?

Thanks for your attention.


Regards,

TiddlyWikier



 
Reply all
Reply to author
Forward
0 new messages