editorjs-to-portabletext
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

EditorJS to Portable Text

This library can be used to convert between a Editor.js block structure and a Sanity Portable Text structure.

From EditorJS to Sanity

import { EditorJSConverter } from 'editorjs-to-portabletext';
const converter = new EditorJSConverter();
const portableText = converter.convert(editorJsContent);

From Sanity to EditorJS

import { PortableTextConverter } from 'editorjs-to-portabletext';
const converter = new PortableTextConverter();
const editorJsContent = converter.convert(portableText);

Readme

Keywords

none

Package Sidebar

Install

npm i editorjs-to-portabletext

Weekly Downloads

0

Version

0.0.4

License

MIT

Unpacked Size

273 kB

Total Files

19

Last publish

Collaborators

  • liammartens