https://github.com/portabletext/toolkit
Toolkit of handy utility functions for dealing with Portable Text
https://github.com/portabletext/toolkit
Last synced: over 1 year ago
JSON representation
Toolkit of handy utility functions for dealing with Portable Text
- Host: GitHub
- URL: https://github.com/portabletext/toolkit
- Owner: portabletext
- License: mit
- Created: 2022-02-04T00:47:09.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-02-06T10:31:28.000Z (over 1 year ago)
- Last Synced: 2025-04-02T11:07:25.833Z (over 1 year ago)
- Language: TypeScript
- Homepage: https://portabletext.github.io/toolkit/
- Size: 903 KB
- Stars: 13
- Watchers: 9
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# @portabletext/toolkit
[](https://www.npmjs.com/package/@portabletext/toolkit)[](https://bundlephobia.com/result?p=@portabletext/toolkit)[](https://github.com/portabletext/toolkit/actions?query=workflow%3Atest)
Javascript toolkit of handy utility functions for dealing with Portable Text.
Particularly useful for building rendering libraries for Portable Text that outputs HTML.
## Installation
```
npm install --save @portabletext/toolkit
```
## Documentation
See [https://portabletext.github.io/toolkit/](https://portabletext.github.io/toolkit/)
## Usage
```ts
import {toPlainText} from '@portabletext/toolkit'
console.log(toPlainText(myPortableTextBlocks))
```
## License
MIT © [Sanity.io](https://www.sanity.io/)