This library can be used to convert between a Editor.js block structure and a Sanity Portable Text structure.
import { EditorJSConverter } from 'editorjs-to-portabletext';
const converter = new EditorJSConverter();
const portableText = converter.convert(editorJsContent);
import { PortableTextConverter } from 'editorjs-to-portabletext';
const converter = new PortableTextConverter();
const editorJsContent = converter.convert(portableText);