Things I have tried
My use case involves rendering Dataview tables in two colums. I have tried both Multi-Column Markdown and Obsidian Column plugins.
Mulit-Column Markdown is definitely my preferred option in regards to usage. My Dataviewjs code blocks can stay in actual code blocks with this plugin, whereas with Obsidian Columns, the Dataviewjs blocks have to live in a callout block, so the code looks awful.
It’s the difference of this with Multi-Column Markdown:
ID: ID_52av Number of Columns: 2 Auto Layout: true border: off
dv.table( ["20-25", "14-19", "8-13", "2-7"], dv.pages('"Folder/Subfolder"') .map(p => [p.field1, p.field2, p.field3, p.field4]) )
— column-end —
dv.table( ["*", "a", "b", "c", "d", "e", "f", "g", "h"], dv.pages('"Folder2/Subfolder2"') .map(p => [p.field0, p.field1, p.field2, p.field3, p.field4, p.field5, p.field6, p.field7, p.field8]) )
=== end-multi-column
Versus this with Obsidian Columns:
>[!col]
>```dataviewjs
>dv.table(
>["20-25", "14-19", "8-13", "2-7"],
>dv.pages('"Folder/Subfolder"')
>.map(p => [p.field1, p.field2, p.field3, p.field4])
>)
>```
>
>```dataviewjs
>dv.table(
>["*", "a", "b", "c", "d", "e", "f", "g", "h"],
>dv.pages('"Folder2/Subfolder2"')
>.map(p => [p.field0, p.field1, p.field2, p.field3, p.field4, p.field5, p.field6, p.field7, p.field8])
>)
>```
What I’m trying to do
Since the usage of Multi-Column Markdown is IMO superior to the usage of Obsidian Columns I would love to just stick with it. Unfortunately there is a flickering problem with rendering Dataview elements in columns with this plugin, that the developer is unlikely to address: https://github.com/ckRobinson/multi-column-markdown/issues/26.
Obsidian Columns does not have this problem, but if I was to use this plugin instead, I would have to deal with coding in callout blocks. I know this might not seem like a big deal, but a lot of my Dataviewjs code blocks get a lot more complex than the example I have above, and I would really prefer to have a real code block with syntax highlighting to code in.
Any suggestions?
- Has anyone come across the Multi-Column Markdown + Dataview flickering issue and found a way around it?
- Is there a way to maybe use dv.view() or some other Dataview rendering method so that I can write most of my Dataviewjs stuff in a code block and then just put a short line like
dv.view(table)
in the Obsidian Columns callout block? - I’m also not opposed to doing the columns with just HTML and CSS, but I’m just not sure how to implement that with a Dataviewjs code block