Plugin for adding many wikitext links from search results?

71 views
Skip to first unread message

Rob Hoelz

unread,
Jun 25, 2018, 9:40:02 AM6/25/18
to TiddlyWiki
Hi everyone,

I really like the "Create wikitext link" button in the editor, but oftentimes I find myself wanting to add many more than one link from a list of search results.  I was thinking it would open a popup that would stay open until dismissed, and each time a link is clicked in the popup it would be added to a bulleted list in the tiddler being edited.  Has anyone written a plugin like this?  If not, it doesn't sound that hard to do - just trying not to reinvent the wheel!

Thanks,
Rob

JD

unread,
Jun 25, 2018, 11:12:03 AM6/25/18
to TiddlyWiki
Hi Rob, if you're comfortable with overwriting a shadow tiddler, you can remove a line of code in $:/core/ui/EditorToolbar/link-dropdown

so basically what you can do is maybe just delete this line
<$action-deletetiddler $tiddler=<<dropdown-state>> />
from the add-link-actions macro

from this 
\define add-link-actions()
<$action-sendmessage $message="tm-edit-text-operation" $param="make-link" text={{$(linkTiddler)$}} />
<$action-deletetiddler $tiddler=<<dropdown-state>> />
<$action-deletetiddler $tiddler=<<searchTiddler>> />
<$action-deletetiddler $tiddler=<<linkTiddler>> />
\end

to this
\define add-link-actions()
<$action-sendmessage $message="tm-edit-text-operation" $param="make-link" text={{$(linkTiddler)$}} />
<$action-deletetiddler $tiddler=<<searchTiddler>> />
<$action-deletetiddler $tiddler=<<linkTiddler>> /
>
\end

the "add wikitext link" dropdown won't close automatically now, you'd have to click the editor toolbar icon again to dismiss the window.

and maybe, if you don't want the searchbar to clear automatically, you can also remove the following line:
<$action-deletetiddler $tiddler=<<searchTiddler>> />

something like that?

-JD


Rob Hoelz

unread,
Jun 25, 2018, 5:29:11 PM6/25/18
to TiddlyWiki
Thanks for the tip, JD - I'll use that for inspiration if I end up writing this thing!
Reply all
Reply to author
Forward
0 new messages