• The plain text of a block, a list of blocks or a document, derived the way the server derives DocumentBlocks.text: one line per text-bearing block, a break run as a newline, a mention as its label or, without one, the resource's name, a code block as its text, and empty lines dropped.

    Parameters

    Returns string

    const document = await lk.documents.getBlocks({ resourceId, documentId })
    console.log(plainText(document) === document.text)