UNPKG

@atlaskit/editor-core

Version:

A package contains Atlassian editor core functionality

19 lines (18 loc) 549 B
import { Schema, Fragment } from '../../prosemirror'; import { Serializer } from '../serializer'; export declare type JSONNode = { type: string; attrs?: object; content?: Array<JSONNode>; marks?: Array<any>; text?: string; }; export declare type JSONDocNode = { version: number; type: 'doc'; content: Array<JSONNode>; }; export default class JSONSerializer implements Serializer<JSONDocNode> { serializeFragment(fragment: Fragment): JSONDocNode; static fromSchema(schema: Schema<any, any>): JSONSerializer; }