remove gridsome
This commit is contained in:
38
docs/api/nodes/table-header.md
Normal file
38
docs/api/nodes/table-header.md
Normal file
@@ -0,0 +1,38 @@
|
||||
# TableHeader
|
||||
[](https://www.npmjs.com/package/@tiptap/extension-table-header)
|
||||
[](https://npmcharts.com/compare/@tiptap/extension-table-header?minimal=true)
|
||||
|
||||
Table headers are optional. But come on, you want them, don’t you? If you don’t want them, update the `content` attribute of the [`TableRow`](/api/nodes/table-row) extension, like this:
|
||||
|
||||
```js
|
||||
// Table rows without table headers
|
||||
TableRow.extend({
|
||||
content: 'tableCell*',
|
||||
})
|
||||
```
|
||||
|
||||
This is the default, which allows table headers:
|
||||
|
||||
```js
|
||||
// Table rows with table headers (default)
|
||||
TableRow.extend({
|
||||
content: '(tableCell | tableHeader)*',
|
||||
})
|
||||
```
|
||||
|
||||
## Installation
|
||||
```bash
|
||||
# with npm
|
||||
npm install @tiptap/extension-table @tiptap/extension-table-row @tiptap/extension-table-header @tiptap/extension-table-cell
|
||||
|
||||
# with Yarn
|
||||
yarn add @tiptap/extension-table @tiptap/extension-table-row @tiptap/extension-table-header @tiptap/extension-table-cell
|
||||
```
|
||||
|
||||
This extension requires the [`Table`](/api/nodes/table), [`TableRow`](/api/nodes/table-row) and [`TableCell`](/api/nodes/table-cell) nodes.
|
||||
|
||||
## Source code
|
||||
[packages/extension-table-header/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-table-header/)
|
||||
|
||||
## Usage
|
||||
<tiptap-demo name="Nodes/Table"></tiptap-demo>
|
||||
Reference in New Issue
Block a user