mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-02-24 17:23:07 +01:00
Add empty composition example (#2835)
* Add empty composition example * Fix linting
This commit is contained in:
parent
2634c58e32
commit
d0144b46a7
8
examples/composition/empty.js
Normal file
8
examples/composition/empty.js
Normal file
@ -0,0 +1,8 @@
|
||||
import { p, text } from './util'
|
||||
|
||||
export default {
|
||||
text: `Type "hello world" enter "hi" enter "bye" backspace over everything`,
|
||||
document: {
|
||||
nodes: [p(text(''))],
|
||||
},
|
||||
}
|
@ -7,6 +7,7 @@ import { Link, Redirect } from 'react-router-dom'
|
||||
import splitJoin from './split-join.js'
|
||||
import insert from './insert.js'
|
||||
import special from './special.js'
|
||||
import empty from './empty.js'
|
||||
import { isKeyHotkey } from 'is-hotkey'
|
||||
import { Button, EditorValue, Icon, Instruction, Toolbar } from '../components'
|
||||
import { ANDROID_API_VERSION } from 'slate-dev-environment'
|
||||
@ -73,6 +74,7 @@ const SUBPAGES = [
|
||||
['Split/Join', splitJoin, 'split-join'],
|
||||
['Insertion', insert, 'insert'],
|
||||
['Special', special, 'special'],
|
||||
['Empty', empty, 'empty'],
|
||||
]
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user