Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to display highlight note as a child bullet to the highlight? #130

Open
stephanmax opened this issue Sep 1, 2023 · 5 comments
Open

Comments

@stephanmax
Copy link

OK, I feel like I am making a stupid mistake, because I see my wanted behavior in a lot of screenshots around. I would like to see the highlight note as a child bullet to the quoted highlight. Just like in this screnshot:

However, the default highlight template seems to add the note as a property and trying

> {{{text}}} [⤴️]({{{highlightUrl}}}) {{#labels}} #[[{{{name}}}]] {{/labels}}

{{#note.length}}{{{note}}}{{/note.length}}

just adds the text in the same block. I also tried copy’n’pasting a tab character into the template editor, but then Logseq throws an error.

What did I do wrong? How can I achieve the same structure as in the screenshot above? Many thanks in advance!

@yitsushi
Copy link

I tried to achieve the same, I couldn't, it seems no matter what happens they will end up in the same block.

For now I just changed the ordering so it's:

{{#note.length}}{{{note}}}{{/note.length}}

> {{{text}}} [⤴️]({{{highlightUrl}}}) {{#labels}} #[[{{{name}}}]] {{/labels}}

That way my note pops out more and easier to read "my note -> reference".

@mbaker3
Copy link

mbaker3 commented Jan 24, 2024

I'm, trying to accomplish the same. It seems 6ee5090 removed that behaviour and it was released as part of 1.12.5.

I can't find any explanation about why the change was made but it would be a really nice feature to bring back as an option in settings. Ideally we could dictate blocks ourselves in the templates but that seems like a much bigger ask.

@jacksonh
Copy link
Contributor

/cc-ing @sywhb I believe this was an issue with Logseq's plugin api not being able to create the child block.

@sywhb
Copy link
Collaborator

sywhb commented Jan 24, 2024

yeah, logseq does not allow us to create nested blocks when generating the content from the template

@mbaker3
Copy link

mbaker3 commented Jan 24, 2024

That's fair. Can we add a third template in the settings for highlight notes that can be optionally defined?
If there is a template defined then the nested child block is created. Otherwise the nested child isn't.

It can be on the user to make sure they remove the note variable from their highlight template if they don't want to see the note duplicated.

It seems block content is less particular about the characters used than property values are. This change might also mitigate #176 🤷.

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

No branches or pull requests

5 participants