How to add context highlighting into node explorer for Shiraz

I was trying to add context highlighting (using context plug in) and inline editing (using rider plug in) for backlinks as seen in this discussion. But I couldn’t make it to work together.

So I thought of using Node explorer of Shiraz which already has inline editing option. Can the context highlighting option also be added to Node explorer. Also how to add a search box at the top of the node explorer.
I was using this Node explorer from the Shiraz site

\define stateTid() node-explorer/$(currentTiddler)$
\define mainFilter() [all[current]!is[system]backlinks[]] [all[current]!is[system]links[]] [all[current]!is[system]tagging[]]
\define dispExplorer()
<$macrocall $name=table-dynamic filter=<<mainFilter>> fields="tbl-expand title tbl-linktype tags created" class="w-100" editButton=no
   stateTiddler=<<stateTid>> />
\end


<$list filter="[all[current]get[node-explorer]!match[hide]] [all[current]!has[node-explorer]]" variable=null>
<$list filter="[subfilter<mainFilter>] +[count[]compare:number:gteq[1]]" variable=null>

<$macrocall 
  $name=details 
  label="Node Explorer"
  status=""
  labelClass="alert alert-secondary py-1 my-2"
	srcClass  ="alert border-secondary py-0"
  src=<<dispExplorer>>
  />

</$list>
</$list>

Sorry if I cannot help here. I never used context plugin as it is a JS plugin and I have no expertise in this field.

Yes you can! Please note that the Node Explorer uses a dynamic table to list the nodes.
See Shiraz 2.4.6 — create stylish contents in Tiddlywiki how to create a searchable dynamic table.

So, with above examples you can create your own searchable node explorer.

https://links.tiddlywiki.org/

Check this site
How does highlighting of searched words happen in the links tiddlywiki site.
@Mark_S can you guide which tiddlers are responsible for context highlighting in links tiddlywiki site ?

The starting code is in the “Search” tiddler, and the individual results are displayed in the $:/_Templates/Components/LinkPanelSearch tiddler. It uses the Dynannotate official plugin. First the search finds the tiddlers that match either the search criteria or the regular expression. Then each tiddler is displayed with the Dynannote widget, which can use either a search string or a regular expression string. The widget uses ‘snippet’ mode to display a snippet of characters surrounding the search term.

2 Likes

Can dynannotate widget be used inside the Node explorer to give context highlighting

This is the code for node explorer

\define stateTid() node-explorer/$(currentTiddler)$
\define mainFilter() [all[current]!is[system]backlinks[]] [all[current]!is[system]links[]] [all[current]!is[system]tagging[]]
\define dispExplorer()
<$macrocall $name=table-dynamic filter=<<mainFilter>> fields="tbl-expand title tbl-linktype tags created" class="w-100" editButton=no
   stateTiddler=<<stateTid>> />
\end


<$list filter="[all[current]get[node-explorer]!match[hide]] [all[current]!has[node-explorer]]" variable=null>
<$list filter="[subfilter<mainFilter>] +[count[]compare:number:gteq[1]]" variable=null>

<$macrocall 
  $name=details 
  label="Node Explorer"
  status=""
  labelClass="alert alert-secondary py-1 my-2"
	srcClass  ="alert border-secondary py-0"
  src=<<dispExplorer>>
  />

</$list>
</$list>

I think you’re asking if you can show context for backlinks in Node explorer? The problem I see is that dynannotate works on the rendered text. So a pretty link wouldn’t match the actual backlink.

https://giffmex.org/stroll/empty.html#%24%3A%2F.giffmex%2FViewTemplate%2Frefscontext

<span class="viewtemplatebigtext">

<$reveal type="nomatch" stateTitle=<<folded-state>> text="hide" tag="div" retain="yes" animate="yes">

<hr>

<$vars searchme=<<currentTiddler>> searchspx={{{ [<currentTiddler>escaperegexp[]]}}} >

<$list filter="[!is[system]all[current]backlinks[]!tag[outlines]!tag[hide]sort[title]] -[is[current]]"><$link><$view field="title"/></$link><span class="indent1"><$link><span class="graybox"><$context term=<<searchme>> /></span></$link></span></$list>
</$vars>

</$reveal>

</span>

This is the code used for context highlighting in the Stroll.
Is it possible to use this context macro in node explorer.

I guess these are the required parts <$vars searchme=<<currentTiddler>> searchspx={{{ [<currentTiddler>escaperegexp[]]}}} > and <$context term=<<searchme>>

I don’t know whether this can be incorporated into the node explorer code I shared above. Is it possible?

@Mark_S
Can this be modified to use in my wikis. Should I remove the subfilter ?