mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-02-13 19:57:00 +01:00
* rename `kind` to `object` for clarity * add deprecation warning for direct access * add deprecation warning for node creation
35 lines
992 B
JSON
35 lines
992 B
JSON
{
|
|
"document": {
|
|
"nodes": [
|
|
{
|
|
"object": "block",
|
|
"type": "paragraph",
|
|
"nodes": [
|
|
{
|
|
"object": "text",
|
|
"leaves": [
|
|
{
|
|
"text": "By default, pasting content into a Slate editor will use the content's plain text representation. This is fine for some use cases, but sometimes you want to actually be able to paste in content and have it parsed into blocks and links and things. To do this, you need to add a parser that triggers on paste. This is an example of doing exactly that!"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"object": "block",
|
|
"type": "paragraph",
|
|
"nodes": [
|
|
{
|
|
"object": "text",
|
|
"leaves": [
|
|
{
|
|
"text": "Try it out for yourself! Copy and paste some HTML content from another site into this editor."
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|