UNPKG

json-joy

Version:

Collection of libraries for building collaborative editing apps.

21 lines (20 loc) 543 B
import type { ViewRange } from '../peritext/editor/types'; import type { SlateDocument } from './types'; /** * Converts Slate.js state to a {@link ViewRange} flat string with * annotation ranges, which is the natural view format for a Peritext model. * * Usage: * * ```typescript * FromSlate.convert(node); * ``` */ export declare class FromSlate { static readonly convert: (doc: SlateDocument) => ViewRange; private text; private slices; private conv; private cont; convert(node: SlateDocument): ViewRange; }