Open Jermolene opened 9 years ago
:+1: that reads like a very nice draft
ok
+1 Great idea. The design science department of my university will use tw5 as website now (in combination with taskgraph) and a readonly theme would be great (we could use it as prototype for our own read only theme). I will report back some ideas when we start building a read only theme.
Also some tiddler actions need to be hidden in read only (clone tiddler etc.).
Regards Felix
I just noticed it is really confusing when a a website user is asked to create a tiddler if it doesn't exist in read only mode.
edit sorry I see it is already on the list (the last point)
IMO read only mode TWs need to check the "missing" tab prior to publishing to prevent this behaviour. ... So there is some more work + knowledge + responsibility left for the editor.
I think the best solution to making it impossible to navigate links to missing tiddlers might be to not render them as links, but as static text.
I was just about to propose supporting exporting to an read-only html and found this. I really like it!
This would really bring TiddlyWiki to a new level. Has there been any updates on this issue?
Hi @lukehsiao no updates as yet, no. Too much to do!
Fair enough. For now, one workaround I've been using is to set the theme as ReadOnly, save the TiddyWiki, then afterwords, edit the HTML file to include this tiddler to have the sidebar hidden by default:
<div created="[timestamp]" creator="[author]" modified="[timestamp]" modifier="[author]" title="$:/state/sidebar">
<pre>no</pre>
</div>
Then I host this file on my public server. Although it still allows viewers to get to the functions if they try, people rarely notice the small '<<' for the sidebar and happily navigate around the Wiki as if it was read-only.
Hi @lukehsiao there is another trick you can use: make a custom "save changes" button that also adjusts the sidebar state:
<$button>
<$action-setfield $tiddler="$:/state/sidebar" $value="no"/>
<$action-sendmessage $message="tm-save-wiki"/>
<$action-setfield $tiddler="$:/state/sidebar" $value="yes"/>
publish changes
</$button>
Dear @jermolene,
That's a very neat trick! What about adding a tiddler to TW.com called saving to read only mode
@Jermolene I'd love this sort of button. However, I'm admittedly not familiar enough with TiddlyWiki yet to know where I should place that code. Can you give me a pointer?
Just place it in any tiddler. Then open that tiddler when you want to press that button. You can also tag that tiddler appropriately if you want to place it in the sidebar for example
@danielo515 So to accomplish the same thing I was doing above, I believe my button should be:
<$button>
<$action-setfield $tiddler="$:/state/sidebar" $value="no"/>
<$action-sendmessage $message="tm-save-wiki"/>
publish changes
</$button>
However, when I click this button, I see the sidebar disappear and it saves the Wiki, but when I open the wiki again, the sidebar is visible. It doesn't seem to properly make it not visible be default.
Yes, that is correct. How is the TW saved? By downloading it as a new copy or overriding the current tiddler one? Please note that maybe you unhide the sidebar and save again.
@lukehsiao A long time ago (12/30/2013) a post in the group [1] let me think about making TW5 readonly which resulted in my guide 'TW5 read-only' at http://tw5readonly.tiddlyspot.com/. As of 7/16/2014 there is a readonly plugin. It is not state-of-the-art but it does work.
[1] https://groups.google.com/forum/#!msg/tiddlywiki/hF30Y9WD9lE/YbZHrUK_c2kJ
I made a simple server example that allows editing only when login via Gitlab
https://github.com/linonetwo/try-passportjs-gitlab-tiddlywiki
I think "edit" means "allow saving to the fs", and "read-only" means "you can edit on-page but not affecting the fs", is enouth.
Hi @linonetwo that's great, very handy for some common usecases
Currently, support for read-only mode is limited to a theme that hides some of the editing apparatus. It's a clumsy arrangement:
It is proposed to replace the current implementation with a new system whereby:
$:/mode
)<$reveal state="$:/mode">
In view mode the following features would be hidden or disabled: