1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-02-20 15:14:38 +01:00
Ian Storm Taylor 6c42f6c9c3 Rename Range to Leaf, and Selection to Range (#1231)
* 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
2017-10-14 15:36:27 -07:00

71 lines
1.5 KiB
JSON

{
"document": {
"nodes": [
{
"kind": "block",
"type": "paragraph",
"nodes": [
{
"kind": "text",
"leaves": [
{
"text": "This example shows how you can make a hovering menu appear above your content, which you can use to make text "
},
{
"text": "bold",
"marks": [
{
"type": "bold"
}
]
},
{
"text": ", "
},
{
"text": "italic",
"marks": [
{
"type": "italic"
}
]
},
{
"text": ", or anything else you might want to do!"
}
]
}
]
},
{
"kind": "block",
"type": "paragraph",
"nodes": [
{
"kind": "text",
"leaves": [
{
"text": "Try it out yourself! Just "
},
{
"text": "select any piece of text and the menu will appear",
"marks": [
{
"type": "bold"
},
{
"type": "italic"
}
]
},
{
"text": "."
}
]
}
]
}
]
}
}