How can I set text/markdown to be the default type value?

Hello,

I just installed the Markdown plugin and I’m wondering how I can make text/markdown the default type value for new tiddlers so I don’t have to rely on the Markdown button or set this each time I open a new tiddler.

Thanks.

There are multiple ways to make a new tiddler, you can create your own button or edit the default. There are multiple ways to include makedown in TiddlyWiki, which are you using? Search the core plugins for markdown and you will see there are more than one way.

Settings > Info > Basics lets to alter the title and tags of new tiddlers and journals. This will change the result of using the + button, however new tiddlers can be created via following a missing link etc…

If you look inside the new tiddler button $:/core/ui/Buttons/new-tiddler you will see it creates the tiddler using $:/core/ui/Actions/new-tiddler and within that <$action-sendmessage $message="tm-new-tiddler"

Here you can simply add additionbal fields and values for your new tiddler actions

<$action-sendmessage $message="tm-new-tiddler" tags=<<get-tags>> type="text/vnd.tiddlywiki"/>
  • See here I set type="text/vnd.tiddlywiki"

Just set what you need to create your markdown tiddler, unless its a tag in the Settings > Info > Basics

Thanks.

This works when I click on the + new tiddler button, but when I make a link within the markdown wiki text via [[link to another tiddler]] syntax. When I click on that new link to open up a new tiddler from it, the type value is still the default. I’m wondering how I can set the default type value from when I open a new tiddler via a new link.

You will notice when you do that it is a missing tiddler, and it says edit to create, that is when you can set it to a markdown tiddler.

  • The “template used” in missing tiddlers can be found here $:/language/MissingTiddler/Hint and you can edit to include what you want, for example your modified new tiddler button.
Missing tiddler "<$text text=<<currentTiddler>>/>" -- click {{||$:/core/ui/Buttons/edit}} to create 

New default tiddler {{||$:/core/ui/Buttons/new-tiddler}}

It would most likely be possible to modify the link widget used to open missing tiddlers, in TW 5.3.x to create a default tiddler and skip the edit step but this may be unwise because you make it harder to create any other tiddler.

1 Like