Editor Toolbar Customization

I’m fairly new to TW. I’ve done some customization, but nothing very in-depth.
Is there a way to have Markdown tiddlers show buttons like “Excise the selected text…”?

I can switch it back to Tiddlywiki 5 to use these, then switch back to Markdown. But that is a pain.
I understand that some resulting text might not be compatible with MD - like linking to images (Where I have to manually prefix it w/ an !) but those manual tasks are much easier than switching the Type back and forth.


1 Like

I believe the reason the excise button $:/core/ui/EditorToolbar/excise is not in markdown tiddlers is because;

  • It’s condition field does not display it.
    • It will display if you change the condition to;
    • [<targetTiddler>type[]] [<targetTiddler>type[text/vnd.tiddlywiki]] [<targetTiddler>type[text/x-markdown]] [<targetTiddler>type[text/markdown]] +[first[]]
      • I am not sure why I have seen both markdown and x-markdown
  • If displayed, as you excise it does not set the new tiddler to type text/markdown or text/x-markdown. If you do so manually it will work.
  • Yes, but if the source has the correct type the transclude process should handle it.

I believe others have most likely delt with this, but we can create a new or alternate excise button that sets the type to that of the source tiddler should work for all types

I looked to see if this is possible, and it relys on tm-edit-text-operation excise and it already uses a type parameter

  • " Type of the replacement to be inserted: Can be one of transclude, link or macro"
  • This may require an edit of the javascript $:/core/modules/editor/operations/text/excise.js
  • I will rase it in the developers forum.

In the mean time use the edited version EditorToolbar_excise-MD.json (526 Bytes)
that will display in markdown tiddlers and set the type on the resulting tiddler.

Thank you SO much for the response, and that .json work around. I think I may have imported it wrong (I just did an ‘Import’ and selected the file), since it still isn’t showing.
I’ll try to get this working, and will keep my eyes open, to see if it ends up being updated in future releases etc.

Thanks again!


The one I gave you only worked on text/x-markdown tiddlers, this one also works on text/markdown tiddlers;

EditorToolbar_excise-MD.json (564 Bytes)

You still need to set the type on the resulting tiddler.

1 Like

Oh! Great. I’ll try that out tonight.

I should have noticed the x- in the json heh.
This ‘patch’ works perfectly! Thank you!