Open all links in a new window

114 views
Skip to first unread message

Mohammad Rahmani

unread,
Jan 4, 2021, 12:26:10 AM1/4/21
to tiddl...@googlegroups.com
Question:
I am working on a presentation tool. Slides are tiddler which have several links to other tiddlers (are not slide. Slide = tiddler with small content big fonts). As a normal behaviour on click these links are opened in the main story river and TW navigates to them!

How can I write a short script instruct TW to open these links in a new window containing a second story river, so I can switch to a new window and then back to my main window and have all those opened links (tiddlers) there!

I thought the Saq two story river as a potential solution! Any ideas?

Best wishes
Mohammad

Saq Imtiaz

unread,
Jan 4, 2021, 2:45:09 AM1/4/21
to TiddlyWiki
Hi Mohammad,

I do something similar to open a new story in a new window sometimes, but it has been  a while since I configured it by tweaking the CSS in the  Stories plugin. Though I am wondering if what you really want is to open the slideshow in a new story, and have the links open in the main story?

If I remember correctly how I set it up, you need to have a tiddler with a navigator widget and list widget (with a different story tiddler title) that you open in a second story. Think of this as the second story window. See $:/_sq/Stories/Templates/Story2Template from Stories for ideas, though yours can be much simpler for instance you don't need the scrollable.

Then you can make links open in this story by one of the following methods:
- wrapping links in a navigator widget that uses the story title of the new story. OR
- borrowing the shift click code from Stories (   $:/_sq/Stories/LinkKeybindings)
- or I have some code to allow invoking actions on shift+click

Sorry for not providing more details, busy morning. Just ask questions if need be and I will answer as time allows.
Regards,

Saq

TiddlyTweeter

unread,
Jan 4, 2021, 3:13:20 AM1/4/21
to TiddlyWiki
Ciao M,

Good question!

Just an FYI ... The behavior of browsers themselves has some incidental relevance here I think. "New Window" can mean "New Tab", dependent on settings. Also, more useful, is links can in many browsers specify the "window" or "tab" name that a Tiddler is opened in. The point being to open "out-of-slide-flow" tiddlers at determined destinations. (FYI TonyM has written in past quite a lot about managing this type of browser behavior.)

Anyway, just thoughts!
TT

Mohammad Rahmani

unread,
Jan 4, 2021, 10:09:47 AM1/4/21
to tiddl...@googlegroups.com
Hi Saq,
 Many thanks for detailed explanation. I had a look at stories and I think I can use it and manage to implement my use case.

Thank you



Best wishes
Mohammad


--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/3c0971c3-9a22-474f-b591-f2343286d73dn%40googlegroups.com.

Saq Imtiaz

unread,
Jan 4, 2021, 10:18:16 AM1/4/21
to TiddlyWiki
Please do ask if you run into issues. You don't need the entire Stories plugin, just look at the tiddlers I mentioned and implement your own.

My setup is a bit more complex because I implemented it as a button that allows the second story to be in a second column, or pop out to a second window.

Mohammad Rahmani

unread,
Jan 4, 2021, 10:29:29 AM1/4/21
to tiddl...@googlegroups.com
Thank you Saq,
 Sure I will ask! I am studying the part with the second story river. 

Yes I see, it is actually too complex ;-)  :)

Best wishes
Mohammad


Saq Imtiaz

unread,
Jan 4, 2021, 10:58:19 AM1/4/21
to TiddlyWiki
I realized it was easier to do than to explain.
https://saqimtiaz.github.io/sq-tw/temp/external-story.html

  • click the button "open story in new window"
  • Shift click a link in the main window

Mohammad Rahmani

unread,
Jan 4, 2021, 11:09:10 AM1/4/21
to tiddl...@googlegroups.com
Saq

That is excellent! Right to the point!

I love the selector shift+click:  I can choose to open inside the main story river or on the separate window!

Thanks a million!

Cheers
Mohammad


coda coder

unread,
Jan 4, 2021, 11:56:14 AM1/4/21
to TiddlyWiki
Tres cool :)

Interestingly, if you launch, then F5 in the new (blank) window, you get a copy of the original story tiddlers.


Reply all
Reply to author
Forward
0 new messages