Editing: An insert table option

AI-generated summary

The discussion revolves around the idea of adding an “insert table” option to the Discourse edit box. andyr suggests that this feature would be useful for structured data and tabulation. Frank agrees but notes that it might break layouts and could be better suited as a plugin.

Some users, such as probus and Mittineague, mention the usefulness of tables in specific contexts, like wiki articles and displaying tabular data. Mittineague also shares a workaround using pre tags to retain column alignment.

lidel proposes an alternative solution using the MathJax Plugin, which allows users to draw tables in LaTeX. However, this method might be too complex for non-tech users like Bhuvanesh, who asks for a simple way to input tabular data.

elijah mentions that table support was considered too difficult under the current Markdown implementation but might be possible with a planned replacement of the Markdown engine. cpradio shares a link to a GitHub blog post that introduces a formal spec for GitHub Flavored Markdown, which includes table support based on CommonMark specs.

The edit box could do with an “insert table” option.

إعجابَين (2)

Oldschool…but useful for structured data and tabulation.

Is it possible as a feature?

There is nothing wrong with tables and are still as useful today as they were when invented.

The CSS guys younger than me would disagree…and I expect them to. It could potentially break their layout.

So I would say this would make for an amazingly specific plugin.

There was a discussion about adding CKEDITOR to discourse it was kind of a lighting rod subject and you can read it here.

While it is more that a, ‘can we add tables’ situation you can get a vibe on what html would do to mark up.

Hmm… I think I will let brighter minds chime in at this point.

Great topic for discussion as it is so specific.

Tables are also often useful for wiki articles and other such posts.

Sometimes tables are good for displaying, ermm, tabular data.
Closest alternative I know is to use pre tags to retain tabs to keep things in their respective column. eg.

	name	date	count
guru	Fred	Aug	12
noob	Ted	Oct	34
pest	Ned	Jan	3
إعجاب واحد (1)

Alternative workaround:

If you install MathJax Plugin it will be possible to “draw” tables in LaTeX :laughing:

Simple:

\begin{array}{c|cc}
\hline A & B & C\\
\hline D & E & F\\
\hline
\end{array}

gives:

One can even go mad and nest them in weird configurations such as:

$$\begin{array}{c}
\begin{array}{cc}
\begin{array}{c|cccc}
\text{min} & 0 & 1 & 2 & 3\\
\hline
0 & 0 & 0 & 0 & 0\\
1 & 0 & 1 & 1 & 1\\
2 & 0 & 1 & 2 & 2\\
3 & 0 & 1 & 2 & 3
\end{array}
&
\begin{array}{c|cccc}
\text{max}&0&1&2&3\\
\hline
0 & 0 & 1 & 2 & 3\\
1 & 1 & 1 & 2 & 3\\
2 & 2 & 2 & 2 & 3\\
3 & 3 & 3 & 3 & 3
\end{array}
\end{array}
\\
\begin{array}{c|cccc}
\Delta&0&1&2&3\\
\hline
0 & 0 & 1 & 2 & 3\\
1 & 1 & 0 & 1 & 2\\
2 & 2 & 1 & 0 & 1\\
3 & 3 & 2 & 1 & 0
\end{array}
\end{array}$$

which renders a fancy triad:

إعجابَين (2)

And then you try to put floating text into your table, expecting that it has sensible auto-sizing for rows and columns… and then you cry. You might even re-write your paper in , until you get to the point where it gets mathy… and then you cry. :cold_sweat:

6 إعجابات

Lol…too funny.

I think simple tables are useful for my backend duties. But when I tangle with CSS folks cognitive dissonance on tables creates polarity.

It weird and I don’t understand why they are all consumed with the kill tables with fire mindset…

When it comes to markup then I draw a total blank. I don’t think a markup solution exists…I could be wrong.

Sometimes you just have to get things done.

Tables can get it done simply (not elegantly).

An alternative and more general way to show tables inside a post by including external ressources, like it is allready done in a web-link preview.
https://meta.discourse.org/t/embed-google-spreadsheet-plugin/21673

Guys, any idiot friendly way to input tabular data? Like copy pasting from a spreadsheet. Asking because I am a non-tech noob, need a simple solution. Most of the stuff here just flew over my head.

I believe table support was considered too difficult under the current Markdown implementation. There is planned work to replace the Markdown engine and then possibly support Markdown tables.

https://meta.discourse.org/t/markdown-table-support-in-a-discourse-topic/13546/99?u=elijah

إعجاب واحد (1)

This may be pertinent and it is based on CommonMark specs and has Table support I believe.

إعجابَين (2)