Are the contents of the editor displayed correctly, and correspond to the
correct tiddler? If so, that editor already works and will save each
keystroke as you type it. Which means, you can't discard your changes and
go back to the previous saved version. If that's OK then your editor is
already up and running. The normal editor goes through a draft mechanism to
allow you to discard your changes without saving them and revert to the
last saved version.
The template you transcluded contains the EditText widget, so if you don't
want the toolbar buttons for the editor, you can also just add an EditText
widget directly.
However, I think your code as it is will only show today's project entry if
it already exists. The quick solution to that might be to add a button at
the top to create a project entry for today, look at documentation for the
Button and ActionCreateTiddler widgets on how to create a tiddler invisibly
in the background.
Alternatively, depending on the naming conventions of your journal
tiddlers, you should be able to set it up so that it displays an empty
editor if there is no journal for today, and typing creates one. (Hint: use
SetWidget and filters to create a variable with the title that today's
journal should have, and use that instead of the first List)
On Wednesday, April 22, 2020 at 9:44:29 PM UTC+2, Lisa Wasserman wrote:
>
> I am using TW to sort notes by creation date and project tag. When I
> select a project, I open a tiddler containing all of the entries for that
> project, sorted by date, descending. I would like this tiddler to contain
> an editor that allows me to create/update a project entry for today's
> date. So far, I've split my entries into two lists, one with today's
> entry, and one with the older entries, then displayed them using difference
> view templates.
>
> <$list
> filter="[!has[draft.of]tag[journal]field:project{!!project}days:created[-1]]">
> <p><h2>Today</h2></p>
> {{||$:/core/ui/EditTemplate/body}}
> </$list>
> <$list
> filter="[!has[draft.of]tag[journal]field:project{!!project}!days:created[-1]sort[created]]">
> <p><h2><$view field="modified" format="date" template="DD-MMM-YYYY"/>
> </h2></p>
> <p><$transclude mode="block" /></p>
> <p>Tasks</p>
> <<list-tagged-draggable tag:"task" subFilter:
> "!has[draft.of]project{!!project}sameday:created{!!created}" itemTemplate:
> "TaskManagementExampleDraggableTemplate" emptyMessage:"None">>
> <br />
> </$list>
>
>
> Using $:/core/ui/EditTemplate/body, I got something that looks like the
> following:
>
>
> [image: tw_example.PNG]
>
>
> The buttons produce markup in the textbox. That said, if I actually want
> to edit and save my current day's entry, I assume that it's a little more
> complicated than what I currently have.
>
>
> I had thought to add Edit, Accept, and Cancel buttons next to the word
> "Today"', and use them to trigger the edit and save tiddler messages,
> however, thought that that would just create a new copy of the tiddler in
> the river. Also, I was wondering if I had to edit a draft version of my
> tiddler.
>
>
> Does anyone know how to make a functional, inline editor for a tiddler?
>
>
> --L. Wasserman
>
>
>
--
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/60ae9ee8-3263-47ee-96f0-c020d690101c%40googlegroups.com.