vriteio / vrite

Open-source developer content platform
https://vrite.io
Other
1.63k stars 65 forks source link

Feat: Full nestable table content support #48

Closed JorgeAtPaladin closed 9 months ago

JorgeAtPaladin commented 1 year ago

Our team has been long looking for a better markdown editor. Specifically, we are looking for one where we can have rich formatting within table cells.

Eg. we often include multi-line code-blocks within our table cells, and this is a feature that's not supported by many of the markdown editors atm, as their data structure doesn't allow for these structures to be nested in eachother.

Would this be something that Vrite might some day support (eg. allow for the nesting of code blocks and other types within tables)?

areknawo commented 1 year ago

Indeed I haven't seen many KBs/editors with this functionality. Following most GFM examples I've seen, Vrite supports one paragraph or image per cell.

Other options are disabled primarly due to design/UI/formatting considerations - overflow block menus, difficulties with column sizing, etc.) - rather than the data structure.

That said, with some work, it can be enabled:

Vrite - Table with nested blocks

This wasn't on the roadmap and isn't a popular feature, but I can consider adding it if you need it to give Vrite a shot.

JorgeAtPaladin commented 1 year ago

Hey @areknawo , that's awesome. The main requirements for our editor are:

  1. Collaboration
  2. Being able to extend the editor with structured custom blocks (eg. our own "table")

If this is something Vrite might be looking to provide in eg. v0.4, we would be happy to become paying supporters.

For 2: We use our editor to write structured reports. A lot of the structure in those reports is static and can be represented as components with specific editable sections.

areknawo commented 9 months ago

v0.4 adds support for block content in tables.

It also implements a redesigned, easier-to-use extension system, with support for JSX and state management akin to modern JS frameworks. This should make for a solid groundwork for upcoming support for custom content renderers. For now you can check examples at the dedicated repo: https://github.com/vriteio/extensions