Souk21 / TW-commandpalette

A command palette for TiddlyWiki. Demo: https://souk21.github.io/TW-commandpalette/
Other
40 stars 5 forks source link

Question: Use template for new tiddler #14

Closed kookma closed 2 years ago

kookma commented 2 years ago

is it possible to use template for creating new tiddler using command-palette?

I mean for example using a task template with some fields/tags, etc.

ahanniga commented 2 years ago

I edited $:/core/modules/widgets/commandpalettewidget.js so that new Tiddlers were of type text/x-markdown. In the createTiddlerResolver() function:

this.tmMessageBuilder('tm-new-tiddler', { title: title, tags: tags, type: 'text/x-markdown' })(e);

A bit of a hack, but it works.

Souk21 commented 2 years ago

Hello, sorry for the delay. Have you tried to create a shortcut (see https://github.com/Souk21/TW-commandpalette/issues/5) ?

kookma commented 2 years ago

It works! Thank you! From #5 I can create custom template for creating new tiddlers