Is there any plugin that enables such functionality?
If not, how could I implement it?
Is there any plugin that enables such functionality?
If not, how could I implement it?
This one does for search results -
https://contextplugin.tiddlyspot.com/ and can be used for back links as well as seen in stroll edition of Tiddlywiki Stroll — A Roam-like experience in a free, downloadable file
Here’s a method that doesn’t use any plugins:
$:/core/ui/DefaultSearchResultList
tiddler.MySearchResults
)caption
field to something like Excerpts
text
field contents with:\define searchResultsExcerpt()
<$let before={{{ [{!!text}split{$:/temp/search}nth[1]split[]last[100]join[]] }}}
after={{{ [{!!text}split{$:/temp/search}nth[2]split[]first[100]join[]] }}}>
<pre style="margin:0 1em;font-size:80%;line-height:1em;color:initial;white-space:normal;width:250px;">
<<before>>__{{$:/temp/search}}__<<after>>
</pre>
\end
{{$:/core/ui/DefaultSearchResultList}}
$:/core/ui/ListItemTemplate
text
field contents from:<div class="tc-menu-list-item"><$link /></div>
to
<div class="tc-menu-list-item"><$link /><<searchResultsExcerpt>></div>
You will now have an additional tab displayed in the sidebar search results. The second tab (called “Excerpts”) will show the same lists as the $:/core/ui/DefaultSearchResultList
, but with the addition of an excerpt of the tiddler’s contents that shows the 100 characters immediately preceding/following the search text (which will be underlined).
enjoy,
-e
The Dynannotate plugin in the official plugin library provides the functionality of extracting and highlighting snippets of search results.
It can be installed via the plugin library. It is preinstalled in the prerelease and can also be explored there.