@umbraco-cms/backoffice
    Preparing search index...

    Type Alias MarkdownParseHelpers

    Helpers specifically for parsing markdown tokens into Tiptap JSON. These are provided to extension parse handlers.

    type MarkdownParseHelpers = {
        applyMark: (
            markType: string,
            content: JSONContent[],
            attrs?: any,
        ) => { attrs?: any; content: JSONContent[]; mark: string };
        createNode: (
            type: string,
            attrs?: any,
            content?: JSONContent[],
        ) => JSONContent;
        createTextNode: (
            text: string,
            marks?: { attrs?: any; type: string }[],
        ) => JSONContent;
        parseChildren: (tokens: MarkdownToken[]) => JSONContent[];
        parseInline: (tokens: MarkdownToken[]) => JSONContent[];
    }
    Index

    Properties

    applyMark: (
        markType: string,
        content: JSONContent[],
        attrs?: any,
    ) => { attrs?: any; content: JSONContent[]; mark: string }

    Apply a mark to content (used for inline marks like bold, italic)

    createNode: (type: string, attrs?: any, content?: JSONContent[]) => JSONContent

    Create any node type with attributes and content

    createTextNode: (
        text: string,
        marks?: { attrs?: any; type: string }[],
    ) => JSONContent

    Create a text node with optional marks

    parseChildren: (tokens: MarkdownToken[]) => JSONContent[]

    Parse an array of block-level tokens

    parseInline: (tokens: MarkdownToken[]) => JSONContent[]

    Parse an array of inline tokens into text nodes with marks