# @manuscripts/prosemirror-tables-sections

> adds head and foot sections to prosemirror-tables

Latest version **0.0.1** (published 2020-02-14) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @manuscripts/prosemirror-tables-sections
pnpm add @manuscripts/prosemirror-tables-sections
yarn add @manuscripts/prosemirror-tables-sections
bun add @manuscripts/prosemirror-tables-sections
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2020-02-14 |
| First published | 2020-02-14 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 64.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Johannes Wilm |
| Maintainers | maci |
| Keywords | prosemirror, tables |

## Links

- npm: https://www.npmjs.com/package/@manuscripts/prosemirror-tables-sections
- Repository: https://gitlab.com/mpapp-public/prosemirror-table-sections
- Homepage: https://gitlab.com/mpapp-public/prosemirror-table-sections#readme
- Issues: https://gitlab.com/mpapp-public/prosemirror-table-sections/issues
- npm.io page: https://npm.io/package/@manuscripts/prosemirror-tables-sections

## Dependencies (3)

- [prosemirror-state](https://npm.io/package/prosemirror-state.md) ^1.2.2
- [prosemirror-tables](https://npm.io/package/prosemirror-tables.md) ^1.0.0
- [prosemirror-transform](https://npm.io/package/prosemirror-transform.md) ^1.2.3

## Alternatives

- [@lexical/table](https://npm.io/package/@lexical/table.md) — 3.0M weekly downloads
- [mantine-datatable](https://npm.io/package/mantine-datatable.md) — 98.2K weekly downloads
- [react-native-collapsible-tab-view](https://npm.io/package/react-native-collapsible-tab-view.md) — 70.6K weekly downloads
- [@handsontable/vue3](https://npm.io/package/@handsontable/vue3.md) — 16.1K weekly downloads
- [vuewordcloud](https://npm.io/package/vuewordcloud.md) — 7.2K weekly downloads

## Recent versions

- 0.0.1 (latest) — 2020-02-14

## README

# prosemirror-table-sections

Add-on for `prosemirror-tables` to add table and footer rows to tables.

This package consists of three parts that can be used independently:

Schema modifications
====
`addTableSections(tableNodes: TableNodes) : TableNodes` adds an attribute to the spec of table rows to
define the section of the row ('head', 'body' (default), or 'foot'). It can be used like this in combination with `prosemirror-tables`

```
import { tableNodes } from 'prosemirror-tables'
import { addTableSections } from 'prosemirror-tables-sections'

const tableOptions = {
    ... // options for tables
}

const nodes = addTableSections(tableNodes(tableOptions))

```

Commands
====
`toggleRowHeader` and `toggleRowFooter` are commands that toggle the section of the rows of the selection (if any) between 'body' and 'head'/'foot'.


Plugin
====
`tableSections(options = {})` returns a plugin that ensures that the order of sections ('head', 'body', 'foot') within any table are correct with any
change. Available options are `maxOneHead? (boolean)` which ensures that there is not more than one header row and `maxOneFoot? (boolean)` which ensures
that there is not more than one footer row, and `minOneHead? (boolean)`/`minOneFoot? (boolean)` which ensure that there is at least one head/foot row.

---
_Source: https://npm.io/package/@manuscripts/prosemirror-tables-sections · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
