Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
davydog187 committed Feb 5, 2023
1 parent 51f421e commit cc47981
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# sanity-plugin-portable-table

A table plugin for [Sanity Studio v3]() that supports [Portable Text](https://www.sanity.io/docs/presenting-block-text) cells.

This plugin is inspired by the official [@sanity/table](https://github.com/sanity-io/table) plugin, but allows you to define a Portable Text configuration in your cells.

## Installation

```
Expand All @@ -13,20 +17,30 @@ yarn add sanity-plugin-portable-table
```

## Usage

Add it as a plugin in sanity.config.ts (or .js):

```
import {defineConfig} from 'sanity'
import {myPlugin} from 'sanity-plugin-portable-table'
import {portableTable} from 'sanity-plugin-portable-table'
export const defineConfig({
/...
plugins: [
myPlugin({})
portableTable({
cellSchema: {
name: 'my-block',
type: 'block',
styles: [],
lists: [],
marks: {decorators: [{title: 'Strong', value: 'strong'}], annotations: []},
}
})
]
})
```

## License

Apache License 2.0 © Dave Lucia
See LICENSE
See LICENSE

0 comments on commit cc47981

Please sign in to comment.