UNPKG

@speckle/shared

Version:

Shared code between various Speckle JS packages

18 lines 879 B
import type { JSONContent } from '@tiptap/core'; import type { Optional } from '../../core/helpers/utilityTypes.js'; /** * Check whether a doc is empty */ export declare function isDocEmpty(doc: JSONContent | null | undefined): boolean; /** * Convert document to a basic string without all of the formatting, HTML tags, attributes etc. * Useful for previews or text analysis. * @param stopAtLength If set, will stop further parsing when the resulting string length * reaches this length. Useful when you're only interested in the first few characters of the document. */ export declare function documentToBasicString(doc: JSONContent | null | undefined, stopAtLength?: Optional<number>): string; /** * Build a rich text document out of a basic string */ export declare function convertBasicStringToDocument(text: string): JSONContent; //# sourceMappingURL=index.d.ts.map