michaellw / Obsidian-Canvas-Style-Menu

Customize canvas styles seamlessly through the canvas menu and support styles extension using CSS snippets.
56 stars 4 forks source link

Collapse note #6

Open Eusorph opened 3 months ago

Eusorph commented 3 months ago

Hello, it would be great to have an option to create a note that can collapse and leave only one line visible or only the title visible.

michaellw commented 3 months ago

Hello, it would be great to have an option to create a note that can collapse and leave only one line visible or only the title visible.

Hello, you can check this Obsidian-Collapse-Node, and canvas-style-menu is inspired by this plugin.

Eusorph commented 3 months ago

Hi, I know Collapse Note and I have used, but it is system wide, while it would be better to just have an option to collapse a note at a time, plus it created a banner at the tope that is not even editable and shows only a word or two. Regardign implementing it in Canvas Style I don't have the slightest idea how to do it. Would you be so kind to explain it to me as you did for text size?

michaellw commented 3 months ago

It's hard to achieve such an effect with css alone, and I don't have any ideas. But I have a css snippet I use myself to spruce up the collapse-node. You can refer to it and modify the relevant code if it satisfies what you want.

https://github.com/michaellw/Obsidian-Canvas-Style-Menu/assets/276357/b74ff261-ce18-4ea1-980d-9a3cc6e751d5

css snippets: canvas-tweak.zip

For the fact that only one or two words can be displayed after collapsing is because collapse-node restricts the display to only 10 letters instead of 10 words, this should be a minor bug.

Eusorph commented 3 months ago

Thank you.