mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-28 01:19:52 +02:00
add ability to click multiple emojis in example (#1619)
* add ability to click multiple emojis currently, after clicking one emoji, user needs to click in the editor before being able to add another emoji this fixes that by jumping to next text block and focusing selection to make it obvious where next insertion will take place. * lint code
This commit is contained in:
committed by
Ian Storm Taylor
parent
0df151ee52
commit
0c7703e206
@@ -77,11 +77,14 @@ class Emojis extends React.Component {
|
||||
const { value } = this.state
|
||||
const change = value.change()
|
||||
|
||||
change.insertInline({
|
||||
type: 'emoji',
|
||||
isVoid: true,
|
||||
data: { code },
|
||||
})
|
||||
change
|
||||
.insertInline({
|
||||
type: 'emoji',
|
||||
isVoid: true,
|
||||
data: { code },
|
||||
})
|
||||
.collapseToStartOfNextText()
|
||||
.focus()
|
||||
|
||||
this.onChange(change)
|
||||
}
|
||||
|
Reference in New Issue
Block a user