Feature Request for tagglytagging plugin

9 views
Skip to first unread message

pepebe

unread,
Jan 4, 2008, 5:15:36 AM1/4/08
to TiddlyWiki
@Simon Baird: Thanks! I really appreciate your tagglytagging plugin.
While working with MPTW I have noticed how much I rely on
tagglytagging. Quite neat!

I love the "excerpts" feature and immediately after I realized that it
was there restructured most of my tiddlers with tiny "appetizers".
Later, I have noticed that you can alter the amount of characters an
excerpt will show (another great feature). After working for a while,
quite content with life and tagglytagging, I wondered if it would be
possible to show instead of a set number of characters the first
paragraph of a tiddler.

Question to Simon and those other wizkids here: Wouldn't that be an
interesting feature to implement? I sure think so, but I don't have a
clue how difficult it would be to do...

Greetings,

pepebe

Simon Baird

unread,
Jan 18, 2008, 10:30:16 AM1/18/08
to Tiddl...@googlegroups.com
Firstly there is a think called excerpt marker. By default it is this:
/%%/

If you put that somewhere in your tiddler then the excerpt will be everything before that marker.

Secondly you could probably get the behaviour you want (display first paragraph) by changing the value of excerptMarker to "\n\n"

Look for this:

excerptMarker: "/%"+"%/"

Change it to this:
excerptMarker: "\n\n"

I have not tested this but I think it will work.

Glad you like the MPTW.

Simon.

pepebe

unread,
Jan 21, 2008, 3:40:48 AM1/21/08
to TiddlyWiki
@Simon

Thx Simon!

Inserting /%%/ into a tiddler to control excerpt behaviour worked
like a charm.

Because I had already written one-paragraph excerpts at the beginning
of each tiddler, I went for the excerptMarker instead and changed
excerptMarker: "/%"+"%/" with excerptMarker: "\n". As you had
suspected, suddenly everything felt into place. Quite neat!

Something I have noticed: Markers for layout control are also shows by
an excerpt. So if I write //test// into a tiddler, the excerpt will
show exactly that. I don't mind if the excerpt isn't written in italic
(in fact I'm glad they don't ) but I don't want to see the slashes
because I was pondering about putting excerpts within special <div> or
<span> containers by using {{excerpt{Test}}} syntax, but right now
this really messes things up. Any idea what to about that?

Cu,

pepebe
> --
> simon.ba...@gmail.com

Simon Baird

unread,
Jan 21, 2008, 5:23:58 AM1/21/08
to Tiddl...@googlegroups.com
Look for the following code in TagglyTaggingPlugin. It's in the getExcerpt function.

	var marker = text.indexOf(this.config.excerptMarker);
if (marker != -1) {
return " {{excerpt{ <nowiki>" + text.substr(0,marker) + "</nowiki>}}}";
}

Delete the highlighted "<nowiki>" and "</nowiki>". (Be careful to not delete the quotes)

Save and reload.

The reason I've done it that way is because wiki markup in the tagging lists can cause formatting problems. Especially if the excerpt cuts off mid-way though a particular wiki markup element.

Simon.

pepebe

unread,
Jan 21, 2008, 9:17:31 AM1/21/08
to TiddlyWiki
Thx Simon.

Though this will the excerpt display with the same css like the
original span or div, I can change that with a simple

.excerpt * {some css styles...}

within the Stylesheet tiddler.

This solves all my problems.

If you fancy a postcard from one of your fans, send me your address.

Greetings,

pepebe
> simon.ba...@gmail.com
Reply all
Reply to author
Forward
0 new messages