Skip to content

Custom Templates#20

Open
m42e wants to merge 1 commit intoSmilyOrg:mainfrom
m42e:stamp
Open

Custom Templates#20
m42e wants to merge 1 commit intoSmilyOrg:mainfrom
m42e:stamp

Conversation

@m42e
Copy link

@m42e m42e commented Nov 15, 2022

I used https://twelvety.micro.blog/2019/01/12/autocomplete-of-tiddlywiki.html before Monaco and I was missing the possibility to have templates.

As I couldn't figure out if and how snippets work, I used the completion mechanism.

You can have a custom marker for the templates completion. Default is ; so in the double form it is ;;. It can be changed in $:/config/smilyorg/monaco-wikitext/stampPrefix.

It will consider all the toddler, tagged with $:/stamp and strip all prefixes up to the last / from the Tiddler name. Leaving only the last part.

If you select the Completion, the ;; and the name is removed and the text of the toddler is inserted instead.

This probably helps someone besides me, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant