1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-02-25 09:43:21 +01:00
Eric Hartline e16b0d58f4 add clarification for paste HTML example (#2344)
* add clarification for paste HTML example

fixes #1392

* Update value.json
2018-10-28 12:37:16 -07:00

37 lines
1.0 KiB
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 rendered HTML content (not the source code) from another site into this editor."
}
]
}
]
}
]
}
}