mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-29 01:50:06 +02:00
Add remove composition example (#2838)
* Add remove composition example * Changed wording a little
This commit is contained in:
@@ -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'],
|
||||
]
|
||||
|
||||
/**
|
||||
|
18
examples/composition/remove.js
Normal file
18
examples/composition/remove.js
Normal 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.')
|
||||
),
|
||||
],
|
||||
},
|
||||
}
|
Reference in New Issue
Block a user