1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-02-25 17:53:37 +01:00
slate/examples/tables/value.json
Renaud Chaput de4c9e478a Lint JSON, CSS and Markdown files with Prettier (#1612)
* Process and Lint CSS, Markdown and JSON files with Prettier

* Run `yarn prettier` to re-format Markdown, CSS and JSON files
2018-02-07 07:58:41 -08:00

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!"
}
]
}
]
}
]
}
}