Hmm, then Dynannotate can’t replace my need for new modal hooks and I need to reopen the PR…
BUT, my tests with Dynannotate and the things I described above were done in a modal, i.e. I do have it working in a modal, even though it shouldn’t (which I didn’t know).
Maybe it has something to do with the modal (a search interface) changing temp tiddlers, which in turn update the modal content, which is inside the $dynannotate
?
Here’s the (maybe) relevant code from the modal tiddler:
<$let modal-tiddler=<<currentTiddler>> >
<$reveal type="nomatch" text="" default={{{ [<resultStore>has[text]] }}} tag="div" class="mwi-goto-results-reveal">
<$dynannotate search={{{ [<resultStore>get[goto-search-term]] }}} searchDisplay="overlay" searchCaseSensitive="no">
<$eventcatcher tag="div" class="mwi-goto-results" $pointerover="<<hover-actions>>" selector=".mwi-goto-result-line">
<$list filter="[<resultStore>get[text]enlist-input[]rest[1]]" counter="counter" emptyMessage="keine Ergebnisse">
<$button class="tc-btn-invisible" actions="<<click-actions>>">
<div class="mwi-goto-result-line" data-result-line=<<counter>> >
<<displayResult>>
I didn’t put the closing tags in the snippet above. resultStore
contains the name of a temp tiddler which has a text field with the search results and some other fields.
Dynannotate works in this modal. When I re-open the modal, the contents of the resultStore-Tiddler is initially shown, if it contains results from a previous search. Dynannotate also works in this case (as opposed to only after a change in the resultStore).
I like that it works, please don’t break it.
PS: I imported the Dynannotate plugin into a TW 5.2.5.