1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-29 09:59:48 +02:00

Add remove composition example (#2838)

* Add remove composition example

* Changed wording a little
This commit is contained in:
Sunny Hirai
2019-05-28 16:42:00 -07:00
committed by GitHub
parent d0144b46a7
commit 78a795b40e
2 changed files with 20 additions and 0 deletions

View File

@@ -8,6 +8,7 @@ import splitJoin from './split-join.js'
import insert from './insert.js'
import special from './special.js'
import empty from './empty.js'
import remove from './remove.js'
import { isKeyHotkey } from 'is-hotkey'
import { Button, EditorValue, Icon, Instruction, Toolbar } from '../components'
import { ANDROID_API_VERSION } from 'slate-dev-environment'
@@ -75,6 +76,7 @@ const SUBPAGES = [
['Insertion', insert, 'insert'],
['Special', special, 'special'],
['Empty', empty, 'empty'],
['Remove', remove, 'remove'],
]
/**

View File

@@ -0,0 +1,18 @@
import { p, text, bold } from './util'
export default {
text: `Select from ANCHOR to FOCUS then press backspace. Move cursor to end. Backspace over all the remaining content.`,
document: {
nodes: [
p(text('Go and '), bold('select'), text(' from this ANCHOR and then')),
p(text('go and select')),
p(text('to this FOCUS then press '), bold('backspace.')),
p(text('After you have done that move selection to very end.')),
p(
text('Then try '),
bold('backspacing'),
text(' over all remaining text.')
),
],
},
}