Is it possible to a open modal window for contextual search by highlighting text

In this wiki, I have made a button to open a modal window which has the context search box of danielo’s ContextPlugin (Its the third button from top at the right bottom of the screen)

This is the code used

<$action-sendmessage $message="tm-modal" $param="$:/core/ui/AdvancedSearch/Context"/>


Instead of a button, is it possible to open this modal window on highlighting some text - with highlighted text being the input for context search (similar to the dynannotate plug in). Or is there a way to include the context search box within the dynannotate modal

1 Like

Yes within the editor…

  • This would certainly be possible using a new EditorToolbar button - create an EditorToolbar button with all the actions you need to trigger that passes the selection to the search.
  • There is already a search and replace Editor Toolbar button but it only operates on the current tiddler being edited.

If you find a way to “trigger” a response to selecting outside the editor and performing a set of custom actions please share as a useful code snipit.

  • Because standard selection is a common user practice perhaps you need a modifier key, right click, or shortcut to trigger this.

I think using dynaannotate would be easier solution. But have to read the docs.