mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-16 12:14:14 +02:00
change a few examples to omit ranges for cleanliness
This commit is contained in:
@@ -6,11 +6,7 @@
|
||||
"nodes": [
|
||||
{
|
||||
"kind": "text",
|
||||
"ranges": [
|
||||
{
|
||||
"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:"
|
||||
}
|
||||
]
|
||||
"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:"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -20,11 +16,7 @@
|
||||
"nodes": [
|
||||
{
|
||||
"kind": "text",
|
||||
"ranges": [
|
||||
{
|
||||
"text": "A wise quote."
|
||||
}
|
||||
]
|
||||
"text": "A wise quote."
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -34,11 +26,7 @@
|
||||
"nodes": [
|
||||
{
|
||||
"kind": "text",
|
||||
"ranges": [
|
||||
{
|
||||
"text": "Order when you start a line with \"## \" you get a level-two heading, like this:"
|
||||
}
|
||||
]
|
||||
"text": "Order when you start a line with \"## \" you get a level-two heading, like this:"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -48,11 +36,7 @@
|
||||
"nodes": [
|
||||
{
|
||||
"kind": "text",
|
||||
"ranges": [
|
||||
{
|
||||
"text": "Try it out!"
|
||||
}
|
||||
]
|
||||
"text": "Try it out!"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -62,11 +46,7 @@
|
||||
"nodes": [
|
||||
{
|
||||
"kind": "text",
|
||||
"ranges": [
|
||||
{
|
||||
"text": "Try it out for yourself! Try starting a new line with \">\", \"-\", or \"#\"s."
|
||||
}
|
||||
]
|
||||
"text": "Try it out for yourself! Try starting a new line with \">\", \"-\", or \"#\"s."
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -6,11 +6,7 @@
|
||||
"nodes": [
|
||||
{
|
||||
"kind": "text",
|
||||
"ranges": [
|
||||
{
|
||||
"text": "There are certain behaviors that require rendering dynamic marks on string of text, like rendering code highlighting. For example:"
|
||||
}
|
||||
]
|
||||
"text": "There are certain behaviors that require rendering dynamic marks on string of text, like rendering code highlighting. For example:"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -20,11 +16,7 @@
|
||||
"nodes": [
|
||||
{
|
||||
"kind": "text",
|
||||
"ranges": [
|
||||
{
|
||||
"text": "// A simple FizzBuzz implementation.\nfor (var i = 1; i <= 100; i++) {\n if (i % 15 == 0) {\n console.log('Fizz Buzz');\n } else if (i % 5 == 0) {\n console.log('Buzz');\n } else if (i % 3 == 0) {\n console.log('Fizz');\n } else {\n console.log(i);\n }\n}"
|
||||
}
|
||||
]
|
||||
"text": "// A simple FizzBuzz implementation.\nfor (var i = 1; i <= 100; i++) {\n if (i % 15 == 0) {\n console.log('Fizz Buzz');\n } else if (i % 5 == 0) {\n console.log('Buzz');\n } else if (i % 3 == 0) {\n console.log('Fizz');\n } else {\n console.log(i);\n }\n}"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -34,11 +26,7 @@
|
||||
"nodes": [
|
||||
{
|
||||
"kind": "text",
|
||||
"ranges": [
|
||||
{
|
||||
"text": "Try it out for yourself!"
|
||||
}
|
||||
]
|
||||
"text": "Try it out for yourself!"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -6,11 +6,7 @@
|
||||
"nodes": [
|
||||
{
|
||||
"kind": "text",
|
||||
"ranges": [
|
||||
{
|
||||
"text": "In addition to nodes that contain editable text, you can also create other types of nodes, like images or videos."
|
||||
},
|
||||
]
|
||||
"text": "In addition to nodes that contain editable text, you can also create other types of nodes, like images or videos."
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -24,11 +20,7 @@
|
||||
"nodes": [
|
||||
{
|
||||
"kind": "text",
|
||||
"ranges": [
|
||||
{
|
||||
"text": ""
|
||||
}
|
||||
]
|
||||
"text": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -38,11 +30,7 @@
|
||||
"nodes": [
|
||||
{
|
||||
"kind": "text",
|
||||
"ranges": [
|
||||
{
|
||||
"text": "This example shows images in action. It features two ways to add images. You can either add an image via the toolbar icon above, or if you want in on a little secret, copy an image URL to your keyboard and paste it anywhere in the editor!"
|
||||
}
|
||||
]
|
||||
"text": "This example shows images in action. It features two ways to add images. You can either add an image via the toolbar icon above, or if you want in on a little secret, copy an image URL to your keyboard and paste it anywhere in the editor!"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -6,11 +6,7 @@
|
||||
"nodes": [
|
||||
{
|
||||
"kind": "text",
|
||||
"ranges": [
|
||||
{
|
||||
"text": "In addition to block nodes, you can create inline nodes, like "
|
||||
},
|
||||
]
|
||||
"text": "In addition to block nodes, you can create inline nodes, like "
|
||||
},
|
||||
{
|
||||
"kind": "inline",
|
||||
@@ -21,21 +17,13 @@
|
||||
"nodes": [
|
||||
{
|
||||
"kind": "text",
|
||||
"ranges": [
|
||||
{
|
||||
"text": "hyperlinks"
|
||||
},
|
||||
]
|
||||
"text": "hyperlinks"
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"kind": "text",
|
||||
"ranges": [
|
||||
{
|
||||
"text": "!"
|
||||
},
|
||||
]
|
||||
"text": "!"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -45,11 +33,7 @@
|
||||
"nodes": [
|
||||
{
|
||||
"kind": "text",
|
||||
"ranges": [
|
||||
{
|
||||
"text": "This example shows hyperlinks in action. It features two ways to add links. You can either add a link via the toolbar icon above, or if you want in on a little secret, copy a URL to your keyboard and paste it while a range of text is selected."
|
||||
}
|
||||
]
|
||||
"text": "This example shows hyperlinks in action. It features two ways to add links. You can either add a link via the toolbar icon above, or if you want in on a little secret, copy a URL to your keyboard and paste it while a range of text is selected."
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -6,11 +6,7 @@
|
||||
"nodes": [
|
||||
{
|
||||
"kind": "text",
|
||||
"ranges": [
|
||||
{
|
||||
"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!"
|
||||
}
|
||||
]
|
||||
"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!"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -20,11 +16,7 @@
|
||||
"nodes": [
|
||||
{
|
||||
"kind": "text",
|
||||
"ranges": [
|
||||
{
|
||||
"text": "Try it out for yourself! Copy and paste some HTML content from another site into this editor."
|
||||
}
|
||||
]
|
||||
"text": "Try it out for yourself! Copy and paste some HTML content from another site into this editor."
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Reference in New Issue
Block a user