sawhney17 / logseq-smartblocks

MIT License
172 stars 12 forks source link

Feature request: Insert the template to the root node. #1

Closed mzwlevi closed 2 years ago

mzwlevi commented 2 years ago

Could you add the choice to insert template to the root node? Such as insert timestamp, this will be useful to write journal. Thank you!

Screen Shot 2022-01-25 at 17 39 24
sawhney17 commented 2 years ago

Good idea. I'll add it to the next release.

mzwlevi commented 2 years ago

Good idea. I'll add it to the next release.

Thank you! The button is really nice!

itsjustmath commented 2 years ago

Yes, this would be great!

I would like to replace the button with the template that gets inserted.

sawhney17 commented 2 years ago

@mzwlevi, added in the latest release

@itsjustmath, can you check the latest release. Is adding the sibling flag what you're looking for?

mzwlevi commented 2 years ago

@mzwlevi, added in the latest release

@itsjustmath, can you check the latest release. Is adding the sibling flag what you're looking for?

Nice! I have shared this in Logseq fans group. But there is a problem about insert time:

Screen Shot 2022-01-26 at 11 00 57

The current time do not show 0, such as the time 11:06 11:00, the insert current time was 11:6 11:0, then I need to add 0 by myself. I have reported this issue: https://github.com/sawhney17/logseq-smartblocks/issues/2

Screen Shot 2022-01-26 at 11 00 41
mzwlevi commented 2 years ago

When using Logseq slash menu to insert current time:

Screen Shot 2022-01-26 at 11 20 49 Screen Shot 2022-01-26 at 11 20 56
sawhney17 commented 2 years ago

@mzmlevi I will cut a release fixing this issue later today. On 26 Jan 2022, 7:24 AM +0400, mzwLevi @.***>, wrote:

When using Logseq slash menu to insert current time:

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

sawhney17 commented 2 years ago

@mzwlevi, you can also now insert inline templates using {{renderer :smartblockInline, sampleTemplate}}

mzwlevi commented 2 years ago

@mzwlevi, you can also now insert inline templates using {{renderer :smartblockInline, sampleTemplate}}

👌

itsjustmath commented 2 years ago

@mzwlevi, added in the latest release

@itsjustmath, can you check the latest release. Is adding the sibling flag what you're looking for?

@sawhney17 is it possible that the template replaces the button completely? As in the same block? Instead of being a sibling or child?

CleanShot 2022-01-31 at 11 05 14@2x

sawhney17 commented 2 years ago

Update to the latest version, it has the option for inline smartblocks is that what you're looking for? Make sure you restart after updating. On 31 Jan 2022, 11:06 PM +0400, Justin Mather @.***>, wrote:

@mzwlevi, added in the latest release @itsjustmath, can you check the latest release. Is adding the sibling flag what you're looking for? @sawhney17 is it possible that the template replaces the button completely? As in the same block? Instead of being a sibling or child? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

axelav commented 1 year ago

I'd still love to see what @itsjustmath is looking for. When you click the button, the current block (of which the button is the content) is replaced with the template. Right now I have to click the button and then delete the original line since I don't want to button to hang around.

Does this make sense?

...user clicks Smartblock...