Colibrio Reader Framework API - Cloud license
    Preparing search index...

    A Node within a content block tree.

    The content block tree describes the structure and contents of a content document in JSON format.

    Nodes that contain children must have blockClass set to CONTAINER. Nodes that are leaves must have blockClass set to TEXT or MEDIA.

    interface IContentBlockData {
        attributes: IAttributeData[];
        blockClass: ContentBlockClass;
        blockType:
            | ContainerContentBlockType
            | MediaContentBlockType
            | TextContentBlockType;
        children: IContentBlockData[];
        id: number;
        locator: Locator;
        marks: IContentBlockMarkData[];
        parentId: number;
        resourceHrefs: string[];
        textContent: string;
    }

    Properties

    attributes: IAttributeData[]

    An array representing all the node's attributes

    blockClass: ContentBlockClass

    Classification of the block. The value 'CONTAINER' implies that children must be set and that textContent is the empty string ''.

    Further specifies the type of block within a block class.

    children: IContentBlockData[]

    Must be empty if blockClass is 'MEDIA' or 'TEXT'

    id: number

    An id that is unique for the content block within the reader document.

    locator: Locator

    A Locator pointing to the content block. Will only be set if the option 'createLocators' was enabled when fetching the content blocks.

    Further describes parts of the textContent. Such as bold or italic text.

    parentId: number

    The ID of the parent ContentBlock, or null if this ContentBlock has no parent.

    resourceHrefs: string[]

    Set if blockClass is "MEDIA". The hrefs may be relative or absolute. If relative, it must be resolved with a resource provider associated with the owner publication.

    textContent: string

    The text content of this block. Is always the empty string if blockClass is 'CONTAINER'. If blockClass is 'MEDIA' it represents the "title" of the media.

    There may be multiple leading/trailing whitespace characters. Words may be separated by multiple whitespace characters.