mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-02-01 13:18:29 +01:00
6c42f6c9c3
* rename Range to Leaf * rename Selection to Range * add findDOMRange, findNode, findRange helpers * refactor to remove findDropPoint util * revert findDOMNode to throwing errors * export new helpers, fix linter * update docs * update examples
75 lines
1.5 KiB
JSON
75 lines
1.5 KiB
JSON
{
|
|
"nodes": [
|
|
{
|
|
"kind": "block",
|
|
"type": "paragraph",
|
|
"nodes": [
|
|
{
|
|
"kind": "text",
|
|
"leaves": [
|
|
{
|
|
"text": "The editor gives you full control over the logic you can add. For example, it's fairly common to want to add markdown-like shortcuts to editors. So that, when you start a line with \"> \" you get a blockquote that looks like this:"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"kind": "block",
|
|
"type": "block-quote",
|
|
"nodes": [
|
|
{
|
|
"kind": "text",
|
|
"leaves": [
|
|
{
|
|
"text": "A wise quote."
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"kind": "block",
|
|
"type": "paragraph",
|
|
"nodes": [
|
|
{
|
|
"kind": "text",
|
|
"leaves": [
|
|
{
|
|
"text": "Order when you start a line with \"## \" you get a level-two heading, like this:"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"kind": "block",
|
|
"type": "heading-two",
|
|
"nodes": [
|
|
{
|
|
"kind": "text",
|
|
"leaves": [
|
|
{
|
|
"text": "Try it out!"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"kind": "block",
|
|
"type": "paragraph",
|
|
"nodes": [
|
|
{
|
|
"kind": "text",
|
|
"leaves": [
|
|
{
|
|
"text": "Try it out for yourself! Try starting a new line with \">\", \"-\", or \"#\"s."
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|