How can I leverage JSON Link Data to insert them via The Editor?

Background: the TiddlyTools MiniBrowser creates and maintains excellent JSON records for links in the format …

{
    "Title": "https://some-site.com",
    "Another Title": "file://some-file"
}

How could I leverage this to create a tool in the Editor that can lookup the entries and insert a record as a link?? like …

[[Title|https://some-site.com]]

Wondering
TT


cc: @EricShulman

Give this a try:

Start by creating a tiddler (e.g., “TiddlyTools/Panels/Browser/EditorToolbar/link”), tagged with $:/tags/EditorToolbar, containing:

\import TiddlyTools/Panels/Browser

\define actions()
<$let lb="[[" rb="]]">
<$action-sendmessage $message="tm-edit-text-operation" $param="insert-text" text={{{ [<lb>] [<mark>] [[|]] [<url>] [<rb>] +[join[]] }}}/>
\end

\define folders_mark(dnd)
<$let url={{{ [<folder>getindex<mark>] }}}>
<$button class=tc-btn-invisible style="display:block;padding:0;margin:0 0.25em;" tooltip=<<url>> actions=<<actions>>>
<$text text=<<mark>>/>
</$button>
\end

\define pop()
<$let folders="$:/config/TiddlyTools/Bookmarks" find="[!match[]]" findid=<<qualify "$(popup)$/find">>>
<$button class=tc-btn-invisible tooltip={{!!caption}} popup={{{ [prefix<folders>then<findid>] }}}>&#x1F516;</$button>
<$reveal state=<<findid>> type=popup position=belowleft><<folders_find>></$reveal>
\end

<<styles>><<pop>>

add a caption field containing:

insert bookmark

add a condition field containing:

[<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]

add a description field containing:

insert a TiddlyTools MiniBrowser bookmark

That’s it. You should now have a new “insert bookmark” EditorToolbar button. When clicked, it will show the MiniBrowser’s “folders_find” interface with an input field to find matching bookmarks, and a list showing the matching bookmarks. Clicking on a bookmark inserts that bookmark’s [[Title|url]] into the tiddler being edited.

enjoy,
-e