1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-08 08:16:30 +02:00

fix install slate example

This commit is contained in:
Ian Storm Taylor
2016-07-17 14:03:18 -07:00
parent 699da23ced
commit 04dee735f5
2 changed files with 11 additions and 7 deletions

View File

@@ -3,10 +3,10 @@
A series of common questions people have about Slate: A series of common questions people have about Slate:
- [How come content is pasted as plain text?](#how-come-content-is-pasted-as-plain-text) - [Why is content pasted as plain text?](#how-come-content-is-pasted-as-plain-text)
#### How come content is pasted as plain text? ### Why is content pasted as plain text?
One of Slate's core principles is that, unlike most other editors, it does **not** prescribe a specific "schema" to the content you are editing. This means that Slate's core has no concept of "block quotes" or "bold formatting". One of Slate's core principles is that, unlike most other editors, it does **not** prescribe a specific "schema" to the content you are editing. This means that Slate's core has no concept of "block quotes" or "bold formatting".

View File

@@ -32,6 +32,8 @@ import { Editor, Raw } from 'slate'
// Create our initial state... // Create our initial state...
const initialState = Raw.deserialize({ const initialState = Raw.deserialize({
nodes: [
{
kind: 'block', kind: 'block',
type: 'paragraph', type: 'paragraph',
nodes: [ nodes: [
@@ -44,6 +46,8 @@ const initialState = Raw.deserialize({
] ]
} }
] ]
}
]
}) })
``` ```