Table creator in markdown
Implementation Guide
We want the plain text editor to have the same functionality as the rich text editor - when you click on the "Insert table" toolbar button, it shows a popup that allows you to select the dimensions of the table, how many rows/cols. Currently the plain text editor adds a 2 x 2 markdown table.
The plain text table toolbar button is added in https://gitlab.com/gitlab-org/gitlab/blob/master/app/views/shared/blob/_markdown_buttons.html.haml#L46-L46. I think this is going to make it a bit of a challenge to add this, as the rich text editor toolbar button is handled via Vue in https://gitlab.com/gitlab-org/gitlab/blob/master/app/assets/javascripts/content_editor/components/toolbar_table_button.vue
#24825 (comment 1387998459) mentions a possible way forward, but it's unclear how to attach a Vue based toolbar button into the HAML.
The overall bigger piece of work would be to leverage the same toolbar code for both editors, possibly triggering events that each editor could then handle as needed.
We've added the ability to easily insert a table when writing markdown. Let's make it even more awesome by allowing users to determine the number of rows/cells.
Inspiration: