TW5 - Newbie - About $:/core/ui/EditTemplate/body

113 views
Skip to first unread message

mauloop

unread,
Jun 2, 2015, 3:28:08 PM6/2/15
to tiddl...@googlegroups.com
I've played with TWC in the past and now I'm exploring the wonders of TW5. I noticed that after having the shadow tiddler $:/core/ui/EditTemplate/body changed it shows the textarea for editing the text of the tiddler still while it is in view mode. I've experimented this behaviour with both the standalone and node.js editions of TW5, using either Firefox or Chrome.
Just edit the tiddler and save it without having nothing actually changed to reproduce this behaviour. Is it the expected behaviour? It does not affect my tests, but let me the possibility to inadvertently modify the tiddler text while I just wanted to view it.

Eric Shulman

unread,
Jun 2, 2015, 3:47:13 PM6/2/15
to tiddl...@googlegroups.com
On Tuesday, June 2, 2015 at 12:28:08 PM UTC-7, mauloop wrote:
I've played with TWC in the past and now I'm exploring the wonders of TW5. I noticed that after having the shadow tiddler $:/core/ui/EditTemplate/body changed it shows the textarea for editing the text of the tiddler still while it is in view mode. I've experimented this behaviour with both the standalone and node.js editions of TW5, using either Firefox or Chrome.
Just edit the tiddler and save it without having nothing actually changed to reproduce this behaviour. Is it the expected behaviour? It does not affect my tests, but let me the possibility to inadvertently modify the tiddler text while I just wanted to view it.

It's actually just a harmless side-effect of the way that the EditTemplate/body definition works:

* The tiddler uses <$list filter="is[current]..." > to control what to display.
* EditTemplate/body is initially a shadow tiddler (a built-in default).
* Unless explicitly written to do so, filters don't automatically look at shadows
* Thus, when you first view EditTemplate/body (as a shadow), the filters it contains don't show any content.
* After you edit and save the tiddler, it becomes a "real" tiddler...
* Thus, when you view EditTemplate/body (after editing), the filters it contains show you the "edit the body" definition for the current *real* tiddler.

enjoy,
-e
Eric Shulman
ELS Design Studios
TiddlyTools - "Small Tools for Big Ideas!"
InsideTiddlyWiki: The Missing Manuals

YOUR DONATIONS ARE VERY IMPORTANT!
HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY "TIP JAR"...

Professional TiddlyWiki Consulting Services...
Analysis, Design, and Custom Solutions:

mauloop

unread,
Jun 2, 2015, 4:01:50 PM6/2/15
to tiddl...@googlegroups.com
Thanks, Eric, for the clear and quick answer. I wrapped the EditTemplate/body in a <$reveal> widget in order to make it disappear while editing certain specific json tiddlers I've created. As well I made a "form" tiddler tagged EditTemplate to be shown in place of the usual textarea for those tiddlers. Everything works, but this side-effect.

Any suggestions to achieve the same goal in a better way?

Jeremy Ruston

unread,
Jun 7, 2015, 9:03:39 AM6/7/15
to TiddlyWiki, mauloop
Hi Mauloop

Just to be clear, is the side-effect you are experiencing that every tiddler includes an editting text area when it is in view mode?

Best wishes


Jeremy

On Tue, Jun 2, 2015 at 9:01 PM, mauloop <mau...@gmail.com> wrote:
Thanks, Eric, for the clear and quick answer. I wrapped the EditTemplate/body in a <$reveal> widget in order to make it disappear while editing certain  specific json tiddlers I've created. As well I made a "form" tiddler tagged EditTemplate to be shown in place of the usual textarea for those tiddlers. Everything works, but this side-effect.

Any suggestions to achieve the same goal in a better way?

--
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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/38911710-a70c-4d7c-b6b8-f31d9879b852%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Jeremy Ruston
mailto:jeremy...@gmail.com

mauloop

unread,
Jun 7, 2015, 1:04:32 PM6/7/15
to tiddl...@googlegroups.com, mau...@gmail.com, jeremy...@gmail.com
No, it happens just with $:/core/ui/EditTemplate/body. I thought it was a little bug. Eric make it clear the cause of this behaviour. Probably adding to the filter something like [!is[$:/core/ui/EditTemplate/body]] solves. I did not try. It is not really a problem for me. I have a lot to learn.

Thanks, Mauloop
Reply all
Reply to author
Forward
0 new messages