[TW5] Open local file in new browser window

117 views
Skip to first unread message

Jon

unread,
Jun 20, 2016, 11:35:02 AM6/20/16
to TiddlyWiki
Hi,

I'm starting the painful process of trying to bring some highly customized TWs into TW5. I frequently link to local files (such as PDFs of research papers), and the new [ext[link]] syntax is very helpful, replacing my custom formatter to force a relative link to be treated as external.

But, is there a way to change the behavior so that the link opens in a new browser window? If a file opens in the same window, then when you go back to TW, it of course doesn't know where you were and is back to the home state. In TWC, my formatter just used onclick to set the _blank target attribute. Since I don't yet understand how to code anything in TW5, I'm hoping there's a more direct way.

Thanks!
Jon

Jeremy Ruston

unread,
Jun 20, 2016, 11:58:16 AM6/20/16
to tiddl...@googlegroups.com
Hi Jon

But, is there a way to change the behavior so that the link opens in a new browser window? If a file opens in the same window, then when you go back to TW, it of course doesn't know where you were and is back to the home state. In TWC, my formatter just used onclick to set the _blank target attribute. Since I don't yet understand how to code anything in TW5, I'm hoping there's a more direct way.

By default, [ext[url]] links should already open in a new browser tab (in HTML terms, they have target=“_blank"). Are you seeing something different? What browser and operating system are you using?

Best wishes

Jeremy


Thanks!
Jon

--
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 post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/3da9de79-1a89-42f3-837b-1ba5b754832a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jon

unread,
Jun 20, 2016, 6:00:19 PM6/20/16
to TiddlyWiki
By default, [ext[url]] links should already open in a new browser tab (in HTML terms, they have target=“_blank"). Are you seeing something different? What browser and operating system are you using?

Thanks for the reply. This put me on the track of figuring out that it's a quirk of the Tab Mix Plus add-on in Firefox. If "Prevent blank tabs when downloading files" is enabled, [ext[url]] links to PDFs open in the same tab, but links to other local files (e.g., html, jpg, excel) open in their own tab as expected. If this option is disabled, all links open in their own tab. So, problem solved, and sorry for bothering the group with what turned out to be a config problem.

Jon
Reply all
Reply to author
Forward
0 new messages