sawhney17 / logseq-smartblocks

MIT License
171 stars 12 forks source link

Call a slash command #33

Closed gu1p closed 1 year ago

gu1p commented 1 year ago

I'm trying to write a template that needs, in the rendering process, to call a specific slash command. Is there a way to do that in the current version?

sawhney17 commented 1 year ago

No. Which slash command? Is it part of another template? On 13 Jul 2022 at 4:50 PM +0400, gustavoip @.***>, wrote:

I'm trying to write a template that needs, in the rendering process, to call a specific slash command. Is there a way to do that in the current version? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

gu1p commented 1 year ago

It's a slash command from a plugin. In my specific case, I want to automatically add a word counter using a template without having to type /Word count manually.

sawhney17 commented 1 year ago

That makes it easier! I'll just add a slot generation feature then you will be able to create word counters directly from smartblocks. On 13 Jul 2022 at 6:38 PM +0400, gustavoip @.***>, wrote:

It's a slash command from a plugin. In my specific case, I want to automatically add a word counter using a template without having to type /Word count manually. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

sawhney17 commented 1 year ago

Just do:

{{renderer :wordcount_<%randUUID%>}}

This will create a word counter when you insert the template provided you're on the latest version of logseq.

gu1p commented 1 year ago

You are fast, young man! Thanks a lot