mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-02-25 09:43:21 +01:00
* Process and Lint CSS, Markdown and JSON files with Prettier * Run `yarn prettier` to re-format Markdown, CSS and JSON files
254 lines
6.5 KiB
JSON
254 lines
6.5 KiB
JSON
{
|
|
"document": {
|
|
"nodes": [
|
|
{
|
|
"object": "block",
|
|
"type": "paragraph",
|
|
"nodes": [
|
|
{
|
|
"object": "text",
|
|
"leaves": [
|
|
{
|
|
"text":
|
|
"Since the editor is based on a recursive tree model, similar to an HTML document, you can create complex nested structures, like tables:"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"object": "block",
|
|
"type": "table",
|
|
"nodes": [
|
|
{
|
|
"object": "block",
|
|
"type": "table-row",
|
|
"nodes": [
|
|
{
|
|
"object": "block",
|
|
"type": "table-cell",
|
|
"nodes": [
|
|
{
|
|
"object": "text",
|
|
"leaves": [
|
|
{
|
|
"text": ""
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"object": "block",
|
|
"type": "table-cell",
|
|
"nodes": [
|
|
{
|
|
"object": "text",
|
|
"leaves": [
|
|
{
|
|
"text": "Human",
|
|
"marks": [
|
|
{
|
|
"type": "bold"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"object": "block",
|
|
"type": "table-cell",
|
|
"nodes": [
|
|
{
|
|
"object": "text",
|
|
"leaves": [
|
|
{
|
|
"text": "Dog",
|
|
"marks": [
|
|
{
|
|
"type": "bold"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"object": "block",
|
|
"type": "table-cell",
|
|
"nodes": [
|
|
{
|
|
"object": "text",
|
|
"leaves": [
|
|
{
|
|
"text": "Cat",
|
|
"marks": [
|
|
{
|
|
"type": "bold"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"object": "block",
|
|
"type": "table-row",
|
|
"nodes": [
|
|
{
|
|
"object": "block",
|
|
"type": "table-cell",
|
|
"nodes": [
|
|
{
|
|
"object": "text",
|
|
"leaves": [
|
|
{
|
|
"text": "# of Feet",
|
|
"marks": [
|
|
{
|
|
"type": "bold"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"object": "block",
|
|
"type": "table-cell",
|
|
"nodes": [
|
|
{
|
|
"object": "text",
|
|
"leaves": [
|
|
{
|
|
"text": "2"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"object": "block",
|
|
"type": "table-cell",
|
|
"nodes": [
|
|
{
|
|
"object": "text",
|
|
"leaves": [
|
|
{
|
|
"text": "4"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"object": "block",
|
|
"type": "table-cell",
|
|
"nodes": [
|
|
{
|
|
"object": "text",
|
|
"leaves": [
|
|
{
|
|
"text": "4"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"object": "block",
|
|
"type": "table-row",
|
|
"nodes": [
|
|
{
|
|
"object": "block",
|
|
"type": "table-cell",
|
|
"nodes": [
|
|
{
|
|
"object": "text",
|
|
"leaves": [
|
|
{
|
|
"text": "# of Lives",
|
|
"marks": [
|
|
{
|
|
"type": "bold"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"object": "block",
|
|
"type": "table-cell",
|
|
"nodes": [
|
|
{
|
|
"object": "text",
|
|
"leaves": [
|
|
{
|
|
"text": "1"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"object": "block",
|
|
"type": "table-cell",
|
|
"nodes": [
|
|
{
|
|
"object": "text",
|
|
"leaves": [
|
|
{
|
|
"text": "1"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"object": "block",
|
|
"type": "table-cell",
|
|
"nodes": [
|
|
{
|
|
"object": "text",
|
|
"leaves": [
|
|
{
|
|
"text": "9"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"object": "block",
|
|
"type": "paragraph",
|
|
"nodes": [
|
|
{
|
|
"object": "text",
|
|
"leaves": [
|
|
{
|
|
"text":
|
|
"This table is just a basic example of rendering a table, and it doesn't have fancy functionality. But you could augment it to add support for navigating with arrow keys, displaying table headers, adding column and rows, or even formulas if you wanted to get really crazy!"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|