# Announcing prosemirror-tables-sections

**URL:** <https://discuss.prosemirror.net/t/announcing-prosemirror-tables-sections/5353>\
**Category:** Show\
**Created:** [March 23, 2023, 1:54pm UTC](https://discuss.prosemirror.net/t/announcing-prosemirror-tables-sections/5353 "2023-03-23T13:54:58Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![massi](https://discuss.prosemirror.net/letter_avatar_proxy/v4/letter/m/b9e5f3/32.png) [@massi](https://discuss.prosemirror.net/u/massi)\
**Post date:** [March 23, 2023, 1:54pm UTC](https://discuss.prosemirror.net/t/announcing-prosemirror-tables-sections/5353/1 "2023-03-23T13:54:58Z")

</div>

Hello, I just published [prosemirror-tables-sections](https://github.com/massifrg/prosemirror-tables-sections), a module derived from [prosemirror-tables](https://github.com/ProseMirror/prosemirror-tables) that adds support for table’s caption, thead, tbody and tfoot.

Your feedback is welcome.

---

<div class="post-metadata">

**Author:** ![marijn](https://discuss.prosemirror.net/user_avatar/discuss.prosemirror.net/marijn/32/15_2.png) [@marijn](https://discuss.prosemirror.net/u/marijn)\
**Post date:** [March 23, 2023, 2:31pm UTC](https://discuss.prosemirror.net/t/announcing-prosemirror-tables-sections/5353/2 "2023-03-23T14:31:50Z")

</div>

Great to see activity in this space. Thanks for publishing this!

---

<div class="post-metadata">

**Author:** ![intaek-h](https://discuss.prosemirror.net/user_avatar/discuss.prosemirror.net/intaek-h/32/3303_2.png) [@intaek-h](https://discuss.prosemirror.net/u/intaek-h)\
**Post date:** [March 26, 2023, 7:19am UTC](https://discuss.prosemirror.net/t/announcing-prosemirror-tables-sections/5353/3 "2023-03-26T07:19:39Z")

</div>

very cool project. i’d appreciate it if you could deploy a static page for the demo!

---

<div class="post-metadata">

**Author:** ![massi](https://discuss.prosemirror.net/letter_avatar_proxy/v4/letter/m/b9e5f3/32.png) [@massi](https://discuss.prosemirror.net/u/massi)\
**Post date:** [March 29, 2023, 10:27am UTC](https://discuss.prosemirror.net/t/announcing-prosemirror-tables-sections/5353/4 "2023-03-29T10:27:14Z")

</div>

@marijn: the demo seems to work fine now, but I can’t compile the README.md with builddocs (see build\_readme script in package.json), could you give me some hints?

@intaek-h: do you know of sites that let you upload such a static page (something like codepen)?

@both: thank you for looking into my project.

---

<div class="post-metadata">

**Author:** ![massi](https://discuss.prosemirror.net/letter_avatar_proxy/v4/letter/m/b9e5f3/32.png) [@massi](https://discuss.prosemirror.net/u/massi)\
**Post date:** [March 31, 2023, 11:36am UTC](https://discuss.prosemirror.net/t/announcing-prosemirror-tables-sections/5353/5 "2023-03-31T11:36:01Z")

</div>

I just published version 0.3.0 that lets you add/remove table head, foot and bodies.

The demo has been adapted to show the new features.

The core features are there; I could add commands to merge/split sections.

I need to update documentation and understand how to publish it as a npm package.

---

<div class="post-metadata">

**Author:** ![massi](https://discuss.prosemirror.net/letter_avatar_proxy/v4/letter/m/b9e5f3/32.png) [@massi](https://discuss.prosemirror.net/u/massi)\
**Post date:** [May 3, 2023, 4:20pm UTC](https://discuss.prosemirror.net/t/announcing-prosemirror-tables-sections/5353/6 "2023-05-03T16:20:41Z")

</div>

I published the package on [npmjs](https://www.npmjs.com/package/@massifrg/prosemirror-tables-sections) as `@massifrg/prosemirror-tables-sections`.

Current version is `0.4.1`.

---

<div class="post-metadata">

**Author:** ![massi](https://discuss.prosemirror.net/letter_avatar_proxy/v4/letter/m/b9e5f3/32.png) [@massi](https://discuss.prosemirror.net/u/massi)\
**Post date:** [June 12, 2023, 10:28am UTC](https://discuss.prosemirror.net/t/announcing-prosemirror-tables-sections/5353/7 "2023-06-12T10:28:29Z")

</div>

There’s a new version (0.4.8) that adds commands to make a new table body, head or foot, out of the currently selected rows.

You don’t need to fully select the rows, the new section is made out of the rows touched by the selection.

The commands are `makeBody`, `makeHead` and `makeFoot`; they don’t alter the selection.

They’ve been added to the demo.

`makeHead` works only when you select the first rows, `makeFoot` only when you select the last ones. Both turn all the head or foot cells into `header_cell` (`<th>` in HTML).

---

<div class="post-metadata">

**Author:** ![massi](https://discuss.prosemirror.net/letter_avatar_proxy/v4/letter/m/b9e5f3/32.png) [@massi](https://discuss.prosemirror.net/u/massi)\
**Post date:** [March 9, 2024, 9:57am UTC](https://discuss.prosemirror.net/t/announcing-prosemirror-tables-sections/5353/8 "2024-03-09T09:57:42Z")

</div>

There’s a new version 0.6.0, that goes back to the original implementation of column resizing – the one in `prosemirror-tables`. Keeping sections, of course.

Going back to that implementation should solve the problems in column widths at table creation and copy-paste.

It’s also a cleaner implementation, that should ease the task of people looking at the code of both `prosemirror-tables` and `prosemirror-tables-sections`.

---

<div class="post-metadata">

**Author:** ![massi](https://discuss.prosemirror.net/letter_avatar_proxy/v4/letter/m/b9e5f3/32.png) [@massi](https://discuss.prosemirror.net/u/massi)\
**Post date:** [March 18, 2024, 11:44am UTC](https://discuss.prosemirror.net/t/announcing-prosemirror-tables-sections/5353/9 "2024-03-18T11:44:14Z")

</div>

Version 0.6.1 is out.

It adds two commands:

- `setComputedStyleColumnWidths`, that sets the cells widths of a table to the actual values you may have set with CSS. It uses [window.getComputedStyle](https://developer.mozilla.org/en-US/docs/Web/API/Window/getComputedStyle) to retrieve those widths. If there’s a column selection, it sets the widths of the selected columns’ cells only, otherwise it sets all the cells widths of the (inner) table in the selection.

- `setRelativeColumnWidths(widths: number[], minwidth?: number)`, that returns a [Command](https://prosemirror.net/docs/ref/#state.Command) to set the relative widths of the (inner) table in the selection. The relative widths must be in the range 0…1.

The code of this version has been checked with the current version of [prosemirror-tables](https://github.com/ProseMirror/prosemirror-tables) (resulting in a bug being fixed).

---

<div class="post-metadata">

**Author:** ![massi](https://discuss.prosemirror.net/letter_avatar_proxy/v4/letter/m/b9e5f3/32.png) [@massi](https://discuss.prosemirror.net/u/massi)\
**Post date:** [March 29, 2024, 8:25pm UTC](https://discuss.prosemirror.net/t/announcing-prosemirror-tables-sections/5353/10 "2024-03-29T20:25:11Z")

</div>

New version 0.6.3 is out.

It should fix a nasty bug in tablemap problems detection.
