I would like my Markdown tables, when rendered, to set their column widths automatically based on the length of the text in that column. For instance, if I have two columns — Index and Note — and the Index column contains integers while the Note column contains a potentially long block of text, it would be great to see the table render automatically with a narrow Index column and a wide Note column. As it is, it appears that the width of any column is determined as follows: 100% / number_of_columns.
Proposed solution
I am not sure how this would be achieved.
Current workaround (optional)
I can manually edit the table HTML to add a column width property, but that is not retained when the page is saved.
It is entirely possible that I am missing something here. Would it make more sense for this to be a feature of the Advanced Tables plugin given that it requires examine the average width of each column?
I’m using Advanced Tables and it is definitely not doing this. Could there possibly be a conflict with another plug-in or with the theme I’m using (which is Obsidian Nord)? Here’s a screenshot.
Notice how both of the columns in the preview are the same width.
Oh. I’m dumb. I missed the “when rendered” portion of your request. I don’t realize you were talking about preview mode. I don’t know how to do that but maybe it’s a feature the advanced tables dev can add?
No problem. Out of curiosity, what do you see when your tables render in preview? Do you see equal column widths, or do the column widths vary with the length of the data in each column?
Yes, that is exactly how tables render for me too on Mac — all columns the same width. So, what am I missing? Seems to me that tables are fairly useless when all the columns are fixed to the same width.
Ha! So we both use the Image Flags snippet, and have nailed the cause of the problem—great.
On my system, I have left it enabled and used above linked CSS snippet, just because I wanted both functionalities: image enhancements plus normal tables.