Edit Suggestion: Simple ways to write protect tiddlers

45 views
Skip to first unread message

Charlie Veniot

unread,
Aug 27, 2021, 6:49:41 PM8/27/21
to TiddlyWiki
Simple ways to write protect tiddlers

Just a suggestion in case you think it is worth it...

To write-protect a tiddler, I'm thinking a good idea to not just prevent edit of such a tiddler, but also prevent delete of such a tiddler.

I've added a little bit to the original sample code in that documentation tiddler:

.tc-tagged-Locked button[title="Edit this tiddler"] {display: none;}
.tc-tagged-Locked button[title="Delete this tiddler"] {display: none;}

Nothing revolutionary there, but kind of cool how easy it is to expand on the simple code pattern.

Eric Shulman

unread,
Aug 27, 2021, 9:51:10 PM8/27/21
to TiddlyWiki
On Friday, August 27, 2021 at 3:49:41 PM UTC-7 cj.v...@gmail.com wrote:
To write-protect a tiddler, I'm thinking a good idea to not just prevent edit of such a tiddler, but also prevent delete of such a tiddler.
I've added a little bit to the original sample code in that documentation tiddler:
.tc-tagged-Locked button[title="Edit this tiddler"] {display: none;}
.tc-tagged-Locked button[title="Delete this tiddler"] {display: none;}

Question:
Let's suppose you lock a tiddler by adding the "Locked" tag and then you need to make changes (e.g., fixing a typo).
How would you unlock the tiddler, since you can't edit it to remove the "Locked" tag?

-e

TW Tones

unread,
Aug 27, 2021, 9:55:32 PM8/27/21
to TiddlyWiki
I add the edit icon to other lists so I can edit a tiddler !

{{||$:/core/ui/Buttons/edit}} <$link/>

Tones

Charlie Veniot

unread,
Aug 27, 2021, 10:03:35 PM8/27/21
to TiddlyWiki
Well, at first I was doing as per the documentation ("To get it back you will need to open the stylesheet tiddler and change "none" to "inline".")

At the moment, I find it more convenient to just keep that css in a dedicated CSS tiddler.  When I want to turn off locking, I just take the "$:/tags/Stylesheet" tag off that stylesheet tiddler.

It would be easy to setup something fancier and super-convenient/easy, but I don't really want it super convenient/easy.

Charlie Veniot

unread,
Aug 27, 2021, 10:06:18 PM8/27/21
to TiddlyWiki
That's good stuff!
Reply all
Reply to author
Forward
0 new messages