mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-09-09 06:30:40 +02:00
Update examples in docs, editable voids example (#4925)
* Update examples in docs, editable voids example * Update typescript docs
This commit is contained in:
@@ -95,7 +95,6 @@ const initialValue = []
|
||||
|
||||
const App = () => {
|
||||
const [editor] = useState(() => withReact(createEditor()))
|
||||
const [value, setValue] = useState([])
|
||||
return (
|
||||
// Add the editable component inside the context.
|
||||
<Slate editor={editor} value={initialValue}>
|
||||
@@ -122,7 +121,6 @@ const initialValue = [
|
||||
|
||||
const App = () => {
|
||||
const [editor] = useState(() => withReact(createEditor())
|
||||
const [value, setValue] = useState()
|
||||
|
||||
return (
|
||||
<Slate editor={editor} value={initialValue}>
|
||||
|
@@ -73,7 +73,7 @@ const App = () => {
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<Slate editor={editor} value={value}>
|
||||
<Slate editor={editor} value={initialValue}>
|
||||
<Editable
|
||||
renderElement={renderElement}
|
||||
onKeyDown={event => {
|
||||
|
Reference in New Issue
Block a user