Any plugin to edit tag on view mode?

I want to add/remove tag quickly, without enter edit mode and confirm the edit.

I find no such plugin on CPL, do you know any plugin that exists? (Better not shadowing core tiddlers like tw-xp’s one)

I think it should be easy to implement. eg:

IMO fast editing way

  • Create a tiddler
title: $:/editions/tw5.com/TiddlerInfo/Tags
tags: $:/tags/TiddlerInfo
caption: Tags
code-body:yes

<$edit field=tags class="tc-max-width"/>

Suboptimal way

Create a tiddler

title: edit-tags/in-view-template
list-before: $:/core/ui/ViewTemplate/classic
tags: $:/tags/ViewTemplate

<% if [{config/edit-tags/in-view-template}match[yes]] %>
{{||$:/core/ui/EditTemplate/tags}}
<% endif %>

If the tiddler config/edit-tags/in-view-template contains yes then the editor will be shown.


Built in way

Use the core $:/Manager

2 Likes

An other possibility for the tiddler info section

title: $:/editions/tw5.com/TiddlerInfo/Tags
tags: $:/tags/TiddlerInfo
caption: Tags
code-body:yes

<style>
.tc-tiddler-info {
  overflow:visible;
}
</style>
{{||$:/core/ui/EditTemplate/tags}}

This needs a bit of CSS STYLE trickery, to show the tag dropdown

1 Like

Saq had previously shared something similar - Sandbox — experimental doodads

Info tab is a way, thank you for sharing.

But to make it a plugin that works for new users, I think affordance matters here, affordance means let new user see the trigger immediately.
Same for transclusion editor, most note app allow edit transclusion target in-place, while this is still a todo for TiddlyWiki.

So I’d prefer Saq’s way mentioned by @arunnbabu81 . The edit button should near the tags. But sadly it also shadow the $:/core/ui/ViewTemplate/tags tiddler.

I think maybe a better way is to add a cascade to this part, and in cascade filter detect if it switched to “edit mode”, if so cascade to an edit template.

What is your reason to want to avoid overriding a shadow tiddler in this situation? This is not a part of the UI that is likely to change in an incompatible manner in the core.

Just in case there are view mode update in the core, because view mode of it isn’t beautiful enought like notion yet. And many of TidGi user use it like Notion, they don’t know anything under the hood, so they may never receive update from shadowed tiddler. So I prefer not shadowing anything in my plugins.

And this plugin should only add a edit mode, so better if there is a cascade.

No plugin needed, I have a package called reimagine tags that includes remove tag from here, on the tag pill dropdown.

one tiddler solution attached $__PSaT_reimagine-tags_remove-tag.json (888 Bytes)

As foundation for the plugin linonetwo/edit-tags-on-view-mode

A PR is merged feat: allow tags have its ViewTemplate tag and cascade by linonetwo · Pull Request #8462 · TiddlyWiki/TiddlyWiki5 · GitHub (Have screenshot here)

It only works after v5.2.6 (not released yet)

Good Job!
Thank you @linonetwo!

Screenshot here, now that v5.2.6 is released, it should work on everyone’s wiki.

图片

图片

Also I’d like to introduce _is_titleless field, they all in the 标题字段 — 将「说明文字 caption」字段显示为标题,并且可以轻松地编辑它。 demo site:

Many quick-recording plugins may just bring up a random title field, but not give you the default caption field. Such plugins will typically add the _is_titleless: yes field to the tiddler. This plugin recognises this usage and displays a friendly edit box to make it easier for you to edit the caption field while editing.

2 Likes

Not a plugin but a tiddler - JD published this some time ago and which still works today.

link: https://groups.google.com/g/tiddlywiki/c/dq2kFZ-_qPU/m/I24tq-EGBgAJ

Screenshot 2025-05-28 at 12-45-22 jim — 5.3.6

Here’s a super trivial way to enable editing tags directly in the tiddler view without having to enter “edit” mode:

  • Edit the TWCore shadow tiddler $:/core/ui/EditTemplate/tags
  • Add tag $:/tags/ViewTemplate
  • Press “done” to save tiddler changes.

That’s it. You will now have the TWCore standard edit mode tag editor displayed at the bottom of every tiddler when viewed.

enjoy,
-e

@amreus @EricShulman I know that was how tiddlywiki community traditionally works, you edit the core tiddler or drag some tiddler to your wiki. But normal users or new users don’t like that, new people like one click install plugin. So make it a plugin is important.

And in that plugin it uses cascade (I added in a PR), so never need to shadow the core tiddler again. Less conflict between plugins, this is also very important.

1 Like

@linonetwo I just want to use this tag UI in another viewtemplate body cascade, not in the tags viewtemplate. How to do that ?

1 Like

Do you mean https://tiddlywiki.com/#View%20Template%20Body%20Cascade ? That is for full-replacement of tiddler body, if you add cascade on it to show tags, the default text won’t show.

But if you really want, add two tiddlers:

  1. the condition part
title: $:/config/ViewTemplateBodyFilters/my-tag-view-template-body
tags: $:/tags/ViewTemplateBodyFilter

<!-- Condition here ↓ -->
[[$:/state/edit-view-mode-tags/]addsuffix<currentTiddler>get[text]compare:string:eq[yes]then[NewTiddlerYouAdd/edit-tags-on-view-mode/EditMode]]

the whole [$:/state/edit-view-mode-tags/]addsuffix<currentTiddler>get[text]compare:string:eq[yes] part is a condition.

  1. and the actual tiddler to show as template
title: NewTiddlerYouAdd/edit-tags-on-view-mode/EditMode

\whitespace trim
<$reveal type="nomatch" stateTitle=<<folded-state>> text="hide" tag="div" retain="yes" animate="yes">
  <div class="tc-tags-wrapper" style="display:flex">
    <$transclude tiddler="$:/core/ui/EditTemplate/tags"/>
    <$button class="tc-btn-invisible" style="width: 2em;">
      {{$:/core/images/done-button}}
      <$action-deletetiddler $tiddler={{{ [[$:/state/edit-view-mode-tags/]addsuffix<storyTiddler>] }}}/>
    </$button>
  </div>
</$reveal>
  1. but you might still need a button to trigger the condition of cascade
  <$button class="tc-btn-invisible" set={{{ [[$:/state/edit-view-mode-tags/]addsuffix<storyTiddler>] }}} setTo="yes" tooltip="add tags">
    {{$:/core/images/new-here-button}}
  </$button>
1 Like

Although you can call the default template from your template. I’ve done this when I wanted my own template to wrap the default one. Credit: I learned this from @EricShulman in another thread.