TW5 tip: Use fields for brief summaries of tiddlers

203 views
Skip to first unread message

David Gifford

unread,
Nov 6, 2013, 4:34:32 PM11/6/13
to tiddl...@googlegroups.com
Sometimes you want lists of tiddlers to display more than just the tiddler title, but not the entire contents of the tiddler. You can write up a brief summary of the tiddler in a summary field, then create lists that display the title and the summary field of the tiddlers in that list (or the tiddlers with a certain tag).

See
http://www.giffmex.org/tw5mall.htm "Lists with tiddler summaries" for instructions.

Dave

Tobias Beer

unread,
Nov 7, 2013, 8:28:52 AM11/7/13
to tiddl...@googlegroups.com
Thanks, Dave, that's a very useful tip.

Makes me wonder though how hard it would be to dynamically and automagically turn a field input into a textarea, perhaps when one hits ENTER, i.e. set the number of displayed lines of such a textarea to the number of literal newline characters in it. Perhaps it could even always be a textarea, starting with 1 line?

Tobias.

David Gifford

unread,
Nov 7, 2013, 8:31:57 AM11/7/13
to tiddl...@googlegroups.com
I have no idea what you just said or what you are wondering.


--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/PYVrMeckvCI/unsubscribe.
To unsubscribe from this group and all its topics, 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.
For more options, visit https://groups.google.com/groups/opt_out.



--
David Gifford
Christian Reformed World Missions, Mexico City

Jeremy Ruston

unread,
Nov 7, 2013, 8:35:12 AM11/7/13
to TiddlyWiki
Makes me wonder though how hard it would be to dynamically and automagically turn a field input into a textarea, perhaps when one hits ENTER, i.e. set the number of displayed lines of such a textarea to the number of literal newline characters in it. Perhaps it could even always be a textarea, starting with 1 line?

In the refactored branch you'll be able to say <$edit-text field="myfield" tag="textarea"/> to force a text area instead of an <input type="text"/>. In TW5 input text areas always resize the fit their text. Does that answer your question?

Best wishes

Jeremy

 

Tobias.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.



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

Tobias Beer

unread,
Nov 7, 2013, 11:07:38 AM11/7/13
to tiddl...@googlegroups.com, jeremy...@gmail.com
In the refactored branch you'll be able to say <$edit-text field="myfield" tag="textarea"/> to force a text area instead of an <input type="text"/>. In TW5 input text areas always resize the fit their text. Does that answer your question?

Not sure, I was thinking more in terms of using / extending the default mechanism for adding / editing / removing fields so as to (somewhat adaptively) allow for multiline content in a custom field.

Tobias.

Ton Gerner

unread,
Nov 7, 2013, 11:45:46 AM11/7/13
to tiddl...@googlegroups.com
Hi Dave,

That is very handy.

Thanks,

Ton

Jeremy Ruston

unread,
Nov 7, 2013, 12:52:28 PM11/7/13
to Tobias Beer, TiddlyWiki


Not sure, I was thinking more in terms of using / extending the default mechanism for adding / editing / removing fields so as to (somewhat adaptively) allow for multiline content in a custom field.

Right. There is already a mechanism for a tiddler field to specify the type attribute of the input element used to edit it. This is how the "color" field gets its special editor:


I've just extended the mechanism to allow the element tag to be specified in the same way, which would allow a field module to stipulate that a text area be used by default for editing that field. I'll push the change shortly.

Best wishes

Jeremy.


 

Tobias.
Reply all
Reply to author
Forward
0 new messages