getgrav / grav-premium-issues

Official Grav Premium Issues repository to report problems or ask questions regarding the Premium products offered.
https://getgrav.org/premium
7 stars 2 forks source link

[nextgen-editor] UI flaw / feature request: HTML tables #310

Open yankl opened 1 year ago

yankl commented 1 year ago

There are various table features which are impossible to accomplish in markdown (at least the flavor of markdown used in Grav): e.g., tables without a header, tables with merged cells, tables with any specific cell properties. And yet, all these features are tantalizingly present in the editor UI.

Perhaps you feel you answered this issue in #58, but wouldn't it be possible for the editor to detect if a table had a feature that wouldn't allow it to be faithfully converted to markdown, and in such a case have the editor save it in the .md as raw HTML instead? (The actually table-to-HTML conversion wouldn't have to be written as I believe this is already part of the underlying CKEditor5.)

On the one hand, this would mean tables with such features created in the editor wouldn't weirdly transform after saving. And on the other hand, it would mean that it would be possible to have tables without those features be edited as tables and not have to look like raw HTML snippets in the editor. It would allow users to have a more seamless table experience, and they would only notice the difference between Markdown and HTML tables if they looked into the .md file.