Item

data class Item(val text: InlineContent, val target: Identifiable, val depth: Int, val subItems: List<TableOfContents.Item> = emptyList())

An item in the table of contents, usually associated to a section of the document.

Parameters

text

text of the item

target

element the item links to

depth

depth of the item. This does not necessarily correspond to the depth of this item in the stack of items, but rather represents the importance of the item.

subItems

nested items

Constructors

Link copied to clipboard
constructor(heading: Heading, subItems: List<TableOfContents.Item> = emptyList())

Shorthand constructor for creating an item from a heading.

constructor(text: InlineContent, target: Identifiable, depth: Int, subItems: List<TableOfContents.Item> = emptyList())

Properties

Link copied to clipboard
val depth: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard