I am quite new to TiddlyWiki using TW version 5.2.2.
Currently, when I drag and drop from the sidebar into the edit field of a tiddler, TiddlyWiki is adding [[square brackets]]. I would like TW to add {{curly brackets}} instead.
Where can I change the code, so that TW is {{transposing}} rather than [[linking]] the dragged element?
Do you want any title, open, recent etc… to be “dropped” as a transclusion, or only tiddlers dragged from a custom sidebar tab / list?
Drop zone is mentioned in the editor tiddler $:/core/ui/EditTemplate/body/default but I can’t see how to modify it. It has recently been improved to allow images to be dropped into the editor.
Behaviour can be added for all tabs in the sidebar so:
Open, Recent, + 1 custom Contents tab
Following this discussion: https://groups.google.com/g/tiddlywiki/c/Qa0hG-_NN9A
it seems that the square brackets have been included in 2017 but I can’t seem to find the specific commit on the github repo to see the diff in the code.
Thus titles with spaces in them are wrapped in double square brackets. This is required by the drag and drop related widgets.
Currently there is no affordance to override this behaviour. What would be needed is an extension of the drag and drop and paste handling in the editor, likely in the form of a plugin.
Thanks for the request @chris. I’ve just added a GitHub ticket that proposes supporting the requested behaviour, and fixing the inconsistency that brackets are not currently applied to titles that do not contain whitespace.
It would be great, if Ctrl + Drag&Drop would transclude rather than link the dragged tiddler.
As it doesn’t work that way yet, I will be interested in what the result of the ticket will be, thank you @jeremyruston for adding it.
I searched available plugins, but did not find one, that could alter the dragging behaviour. So I might try to write a plugin.
While we’re waiting for an official fix, an easier solution might be to hack the transclusion tool in the toolbar so that it not only puts curly braces around text, but strips out any square brackets. That would make it easy to quickly convert a link to a transclusion.
Thank you @Mark_S for your post. This works really nicely.
Searching further, I found that Charlie_Veniot has built a nice plugin called Transclude Assistant for transposing existing tiddlers. Instead of searching the sidebar and then drag from the search results, searching could be done in the Transclude Assistant directly then.
I will give it a try as well.