@Tones just as background, the reason this works is because the edit-text
widget is being used via a view template which is not dependent on the
target tiddler and thus does not need to be refreshed. You can directly tag
$:/core/ui/EditTemplate/body with $:/tags/ViewTemplate and it would work.
The approach I've taken in one of my wikis is to have a toggle button in
the tiddler view toolbar which switches between edit and view mode by
toggling qualified state tiddlers. Switching to edit mode is equivalent to
hiding the body and showing the editor. The advantage of using state
tiddlers is that you aren't modifying the content tiddler just by switching
to edit mode and back.
In terms of styling checkboxes, I prefer to use buttons in the toolbar. I
am not that fond of checkboxes in general and when appropriate I style them
as toggle buttons as well. You can see this in the settings tiddler of
Streams. If that is of interest to you it has a separate style sheet
extracted from my UI components library.
Cheers,
Saq
On Friday, May 28, 2021 at 9:51:28 AM UTC+2 TW Tones wrote:
> OOps
>
> Also add a tiddler tagged $:/tags/ViewTemplate containing
> <$list filter="[all[current]inline-edit[yes]]">
> {{||$:/core/ui/EditTemplate/body}}
> </$list>
>
> Regards
> Tones
> On Friday, 28 May 2021 at 17:48:02 UTC+10 TW Tones wrote:
>
>> Folks,
>>
>> Having worked with TiddlyWiki for some time, I have managed to get a way
>> to edit the text field without going into edit mode. I just went to revisit
>> this with a minimal case, and was surprised it worked, in part because its
>> easy to share.
>>
>> Place the following in a tiddler tagged $:/tags/ViewToolbar
>> \whitespace trim
>> <$list filter="[all[current]has:field[inline-edit]]">
>> <$checkbox field="inline-edit" checked="yes" unchecked="no"
>> default="no"></$checkbox>
>> </$list>
>>
>> Now any tiddler to which you add the field inline-edit will gain a
>> checkbox in the toolbar, allowing you to toggle editing the text in view
>> mode, without loosing focus in edit mode.
>>
>> Question
>> This button need a little more work, to comply with the tiddlywiki
>> standard, I will do that shortly. However my Question is since this is easy
>> to achieve does anyone know how to restyle the checkbox better for use in
>> the toolbar?
>>
>> - Make it larger and similar in size to existing buttons
>> - Provide a tooltip
>> - Perhaps alter the color
>>
>> I will then refine and republish here.
>>
>> Tones
>>
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/6544b1ef-3fe3-4baf-b9d8-7c4d0edf06e6n%40googlegroups.com.