TiddlyDesktop icon indicating copy to clipboard operation
TiddlyDesktop copied to clipboard

Link to a tiddler in another wiki does not open in TiddlyDesktop

Open gernert opened this issue 7 years ago • 6 comments

See discussion: https://groups.google.com/forum/#!topic/tiddlywiki/fNjdAa9_Hno

With 'standard' browsers it is possible to open a tiddler in another wiki (link made via permalinking). If you try to do the same in TiddlyDesktop, it does not open this tiddler in TiddlyDesktop but opens the tiddler in the default browser.

Tested with Linux Mint 17.3, Firefox 58 and Tiddlydesktop 0.0.13.

gernert avatar Mar 08 '18 17:03 gernert

This used to be a feature, it was removed here 718d17344e8d6c6e475112a615293f01968b6fd7 because something in nw.js broke it.

mklauber avatar Mar 09 '18 13:03 mklauber

@mklauber Thanks for the info. Hopefully it will be re-introduced.

gernert avatar Mar 09 '18 16:03 gernert

Documenting and ensuring the command line allows wikis to open into tiddlydesktop maybe the best approach to this, because once the command line is available other applications can do it as well.

  • Allowing named html files, such as with a .tw extension eg tiddlywiki.tw would allow the local operating system to have a file association to open such files in the selected client eg the browser AND/OR tiddlydesktop.
    • alternatively allow html/htm files on file://
  • Then within tiddlydesktop we may be able to get it to also recognise paths to .tw files and treat these as open in Tiddlydesktop

AnthonyMuscio avatar Apr 19 '23 00:04 AnthonyMuscio

Documenting and ensuring the command line allows wikis to open into tiddlydesktop maybe the best approach to this, because once the command line is available other applications can do it as well.

TiddlyDesktop already has a command line option to open a wiki but it doesn't help with opening one wiki from another because wikis can't interact with the command line.

  • Allowing named html files, such as with a .tw extension eg tiddlywiki.tw would allow the local operating system to have a file association to open such files in the selected client eg the browser AND/OR tiddlydesktop.

TiddlyDesktop requires an .HTML extension for wiki files because of a fundamental limitation in the HTML <iframe> element; when used with a file:/// URI as in TiddlyDesktop, the browser engine needs an .HTML extension so that it knows that the file is an HTML file.

  • Then within tiddlydesktop we may be able to get it to also recognise paths to .tw files and treat these as open in Tiddlydesktop

I think you're suggesting registering TiddlyDesktop as the handler for .HTML files; that won't work as discussed above. But it may be possible for TD to register itself with a custom URL protocol, so that links like tiddlydesktop://User/Joe/myfile.html will automatically open in TiddlyDesktop from any browser.

Jermolene avatar Apr 19 '23 07:04 Jermolene

But it may be possible for TD to register itself with a custom URL protocol, so that links like tiddlydesktop://User/Joe/myfile.html will automatically open in TiddlyDesktop from any browser.

Taking advantage of this suggestion, I've tried what follows.

  1. I've createde the custom url protocol "tiddlydesktop" through the following .desktop file:
[Desktop Entry]
Type=Application
Name=Tiddlydesktop-0.0.18 Scheme Handler
Exec=/run/media/alex/MULTIM/ISO/tiddlywiki_family/TiddlyDesktop/TiddlyDesktop-linux64-v0.0.18/nw --no-sandbox %U
StartupNotify=false
MimeType=x-scheme-handler/tiddlydesktop;
xdg-mime default 'tiddlydesktop-0-0-18-scheme-handler.desktop' x-scheme-handler/tiddlydesktop

sudo update-desktop-database

The final result is that by clicking on a link like: tiddlydesktop://path/to/my-wiki.html TiddlyDesktop's general window happens to be opened but not the wiki specified by the link and only if the link does not appear within a wiki.html file (in that case only a new tiddler is proposed, like in every other case in which a link appears in italics).

Can anyone help in completing the task? Thanks Alex

Alexandros81 avatar Sep 26 '23 14:09 Alexandros81

In in testing most other browsers by me in the past if you have an association for .tw files to open in a browser the browser identifies it contains html and works as expected. Perhaps the scaled down browser in tiddlydesktop cant handle this but it is common otherwise.

I also found a number of the saving and plugins on tiddlywiki are fine.

AnthonyMuscio avatar Sep 26 '23 23:09 AnthonyMuscio