tiddlyhost / tiddlyhost-com

Rails application for creating and hosting TiddlyWiki sites, plus resources for deploying it to https://tiddlyhost.com/
Other
184 stars 17 forks source link

How to revert save button functionality to download the wiki? #256

Closed wccbuck closed 1 year ago

wccbuck commented 1 year ago

The save button on my wiki used to download the page locally, just like the feature behaves on tiddlywiki.com. At some point in the past (I can't seem to find reference to it in the commits), this feature changed to upload wiki changes if the owner clicks the button, and throw an error otherwise. This is not useful to me, and I would much prefer the button exhibit the old behavior. How can I do this?

wccbuck commented 1 year ago

I figured it out. Edit the shadow tiddler titled "$:/core/modules/savers/download.js" and change the priority to 10000. It's really obnoxious that I have to overwrite a shadow tiddler to do this but I know it's not tiddlyhost's fault. Thank you

simonbaird commented 1 year ago

A couple of notes:

So because of item two, I'm not sure I understand why you want to have the save button do a download style save. If you're just saving locally then you don't really need Tiddlyhost.

simonbaird commented 1 year ago

If you do understand all that and just want a convenient download link within your TiddlyWiki, there's some examples of how you can do it here.

wccbuck commented 1 year ago

Thank you for the replies. To clarify my use case, my tiddlywiki is eberron.tiddlyhost.com, which is a tabletop RPG notebook that I share with others so that they can build on what I've done for their home games. Since I work on the document locally using node.js and maintain a github for it, and since there is already an upload process for updating the hosted tiddlywiki, complete with an "are you sure" prompt, I have no need for the save button to duplicate that functionality.

simonbaird commented 1 year ago

Ah, ok, that does make sense. Thanks for the explanation. That is an interesting use case and a workflow that I had not thought of. (Even so, you might still want to consider trying one of the other download methods, or at least be aware they are an option.)