arnau / obsidian-metatable

An Obsidian plugin to display the frontmatter section as a fully expanded table.
MIT License
150 stars 13 forks source link

Can line breaks be supported? #54

Closed StrollStars closed 12 months ago

StrollStars commented 1 year ago

I tried inserting "\n" in the value to create line breaks, but it seems to be ignored, and the text is still displayed in a single line. I'm using custom CSS, but it only applies to the default display of Front-matter.

arnau commented 1 year ago

Thanks for reporting. Line breaks is not a feature I'm planning in doing. Happy to keep the issue open in case someone wants to give it a go.

Regarding your comment around custom CSS, I'm understanding it's unrelated to line breaks? If so, the short answer is that it's expected. See https://github.com/arnau/obsidian-metatable/blob/main/docs/sections/customising_colours_and_symbols.md and https://github.com/arnau/obsidian-metatable/blob/main/docs/sections/customising_parts.md (best viewed as an Obsidian vault). If you truly want to bring your own CSS you can enable the "naked" flag in settings.

StrollStars commented 1 year ago

@arnau Thank you for your help. I tried using the "naked" flag, but it didn't work well because it caused the metadata to be displayed in a table format with borders, which is not aesthetically pleasing. So, I would prefer if the plugin itself could support line breaks.

arnau commented 1 year ago

The point of using "naked" is to use your own CSS. Typically you'd either use a copy of the CSS file from this plugin or bring your own. For example https://github.com/arnau/obsidian-metatable/issues/41

StrollStars commented 1 year ago

@arnau I enabled naked and used my own CSS to achieve my goal, but because the overall look was not aesthetically pleasing, I ended up disabling naked. What does use a copy of the CSS file from this plugin mean? Does it refer to directly modifying the .obsidian\plugins\obsidian-metatable\styles.css?

arnau commented 1 year ago

I meant you can copy the .obsidian/plugins/obsidian-metatable/styles.css into .obsidian/snippets/metatable.css and enable it in the Obsidian configuration (bottom part of Appearance).

The Obsidian help gives you a nice write down

StrollStars commented 12 months ago

@arnau Thank you for your help.