UNPKG

@nacelle/rich-text-utils

Version:

A set of Typescript types and helpers to work with Rich Text fields.

22 lines (21 loc) 1.28 kB
import { Mark, NodeType } from './types'; export declare const blockquoteNodeType: "blockquote"; export declare const blockNodeType: "block"; export declare const codeNodeType: "code"; export declare const headingNodeType: "heading"; export declare const inlineEntryNodeType: "inlineEntry"; export declare const entryLinkNodeType: "entryLink"; export declare const linkNodeType: "link"; export declare const listItemNodeType: "listItem"; export declare const listNodeType: "list"; export declare const paragraphNodeType: "paragraph"; export declare const rootNodeType: "root"; export declare const spanNodeType: "span"; export declare const thematicBreakNodeType: "thematicBreak"; export declare const allowedNodeTypes: ("link" | "blockquote" | "code" | "span" | "root" | "paragraph" | "heading" | "list" | "listItem" | "thematicBreak" | "block" | "entryLink" | "inlineEntry")[]; export declare type AllowedChildren = Record<NodeType, 'inlineNodes' | NodeType[]>; export declare const allowedChildren: AllowedChildren; export declare const inlineNodeTypes: ("link" | "span" | "entryLink" | "inlineEntry")[]; export declare type AllowedAttributes = Record<NodeType, string[]>; export declare const allowedAttributes: AllowedAttributes; export declare const allowedMarks: Mark[];