This was going to be a question, but I found a hack/answer so share it here
Background
The excise editorToolbar button is a very useful tool when building wikis and managing content.
The transclusion operation replaces the text with the transclusion of a named tiddler in which the selected text was excised.
So in the text we have {{new tiddler}}
.
My Objective;
I would like to clone and/or modify the excise tool so I can optionally instead replace the excision with ``{{||new tiddler}}` so that it refers to the currentTiddler. This would be helpful in following a workflow I have for building forms from “stolen” html.
My Problem
It appears the transclusion string of the excise tool is built into the java script text operation javascript $:/core/modules/editor/operations/text/excise.js
My Solution
In $:/core/modules/editor/operations/text/excise.js under operation.replacement = excisionTitle; add an additional case;
case "transclude-here":
operation.replacement = "{{||" + operation.replacement+ "}}";
break;
Note the addition of “||” to the prefix.
Then in $:/core/ui/EditorToolbar/excise-dropdown add another option to the select
<option value="transclude-here">transclude here</option>
Save your wiki and reload so the updated javascript is current.
Now when excising content you have an additional option to “transclude here” which will wrapp the tiddler as {{||New Tiddlername}}
.’
I have attached the modified tiddlers for convenience. excise-here-editor-toolbar.json (3.7 KB)
So I solved my own problem and share it for all, but I would note you could extend the excise tool further using this method if all you want is alternate prefix or suffix applied.