Marks

Marks are how GitBook represents formatting data that is attached to the characters in the text itself—things like bold, italic, code.

Formatting

Bold

{
"object": "text",
"leaves": [
{
"object": "leaf",
"text": "Hello",
"marks": [
{ "type": "bold" }
]
}
]
}

Italic

{
"object": "text",
"leaves": [
{
"object": "leaf",
"text": "Hello",
"marks": [
{ "type": "italic" }
]
}
]
}

Strikethrough

{
"object": "text",
"leaves": [
{
"object": "leaf",
"text": "Hello",
"marks": [
{ "type": "strikethrough" }
]
}
]
}

Code

{
"object": "text",
"leaves": [
{
"object": "leaf",
"text": "Hello",
"marks": [
{ "type": "code" }
]
}