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

    Type Alias JSONContent

    A Tiptap JSON node or document. Tiptap JSON is the standard format for storing and manipulating Tiptap content. It is equivalent to the JSON representation of a Prosemirror node.

    Tiptap JSON documents are trees of nodes. The root node is usually of type doc. Nodes can have other nodes as children. Nodes can also have marks and attributes. Text nodes (nodes with type text) have a text property and no children.

    const content: JSONContent = {
    type: 'doc',
    content: [
    {
    type: 'paragraph',
    content: [
    {
    type: 'text',
    text: 'Hello ',
    },
    {
    type: 'text',
    text: 'world',
    marks: [{ type: 'bold' }],
    },
    ],
    },
    ],
    }
    type JSONContent = {
        attrs?: Record<string, any>;
        content?: JSONContent[];
        marks?: { attrs?: Record<string, any>; type: string; [key: string]: any }[];
        text?: string;
        type?: string;
        [key: string]: any;
    }

    Indexable

    • [key: string]: any
    Index

    Properties

    attrs?: Record<string, any>

    The attributes of the node. Attributes can have any JSON-serializable value.

    content?: JSONContent[]

    The children of the node. A node can have other nodes as children.

    marks?: { attrs?: Record<string, any>; type: string; [key: string]: any }[]

    A list of marks of the node. Inline nodes can have marks.

    Type Declaration

    • [key: string]: any
    • Optionalattrs?: Record<string, any>

      The attributes of the mark. Attributes can have any JSON-serializable value.

    • type: string

      The type of the mark

    text?: string

    The text content of the node. This property is only present on text nodes (i.e. nodes with type: 'text').

    Text nodes cannot have children, but they can have marks.

    type?: string

    The type of the node