json-joy
Version:
Collection of libraries for building collaborative editing apps.
15 lines (14 loc) • 800 B
TypeScript
import type { JsonMlNode } from 'very-small-parser/lib/html/json-ml/types';
import type { THtmlToken } from 'very-small-parser/lib/html/types';
import type { PeritextMlNode } from '../block/types';
import type { ViewStyle, ViewRange } from '../editor/types';
export declare const toJsonMl: (json: PeritextMlNode) => JsonMlNode;
export declare const toHast: (json: PeritextMlNode) => THtmlToken;
export declare const toHtml: (json: PeritextMlNode, tab?: string, indent?: string) => string;
/** JSON data embedded as Base64 data attribute into HTML clipboard buffer. */
export interface ClipboardData {
view?: ViewRange;
style?: ViewStyle[];
}
export declare const exportHtml: (view: ViewRange, node: PeritextMlNode) => string;
export declare const exportStyle: (style: ViewStyle[]) => string;