Help wanted to modify the editor Toolbar Create Wiki text link


In the editor toolbar we have the Link icon defined in $:/core/ui/EditorToolbar/link and its dropdown $:/core/ui/EditorToolbar/link-dropdown

  • This is a very useful tool I often forget to make use of, but I suggest anyone reading this to revisit it.
  • I plan soon to develop some new Editor toolbar buttons based on this one, som examples below Futures.
  • But before that I realised an improvement to the existing one would be if the search string could be populated with the text string selected in the editor.

I raise this here because to be honest, I have not mastered the $keyboard widget yet and find reading the code in $:/core/ui/EditorToolbar/link-dropdown very difficult.

  • In this current journey I have discovered some gaps in the documentation which could be linking more explicitly the keyboard-driven-input, edit-text and edit widgets.

As far as I can see it may just be a matter of leveraging the the following action to store the selection in the “tiddler” or “storeTitle” parameter;

  • Any help greatly appreciated
  • This may be a trivial improvement that deserves addition to the core


My ideas of new Editor toolbar buttons based on link button include;

  • link Buttons with a subfilter applied to the search
    • search to insert link to tags only
    • search only tiddlers tagged with the current one, or a toc from here
      • I may leverage the kin filter of @bimlas here to make this easy
    • Search only those active items, items not (done or archived)
    • A search where the result is listed in a custom order like mode recently used
  • Alternative insertions of the found result eg in addition to tiddler links
    • Transclude the found tiddler title
    • Insert a macro where the title is the first parameter
  • others as yet unimagined

To do this being able to “prime the link search” with the selection in the editor will add a lot of functionality to these future Editor toolbar buttons. Hence this post.

Thanks in advance for any suggestions or help.