mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-23 15:32:59 +02:00
This reverts commit 6f676d6771
.
This behavior should be in userland, because there isn't agreement
among text editors on how it should behave.
Resolves #1269.
This commit is contained in:
committed by
Ian Storm Taylor
parent
1777fc3959
commit
6298d5442d
@@ -474,15 +474,9 @@ function AfterPlugin(options = {}) {
|
|||||||
const { state } = change
|
const { state } = change
|
||||||
|
|
||||||
if (HOTKEYS.SPLIT_BLOCK(event)) {
|
if (HOTKEYS.SPLIT_BLOCK(event)) {
|
||||||
if (state.isInVoid) {
|
return state.isInVoid
|
||||||
return change.collapseToStartOfNextText()
|
? change.collapseToStartOfNextText()
|
||||||
} else {
|
: change.splitBlock()
|
||||||
change = change.splitBlock()
|
|
||||||
state.activeMarks.forEach((mark) => {
|
|
||||||
change = change.addMark(mark)
|
|
||||||
})
|
|
||||||
return change
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HOTKEYS.DELETE_CHAR_BACKWARD(event)) {
|
if (HOTKEYS.DELETE_CHAR_BACKWARD(event)) {
|
||||||
|
Reference in New Issue
Block a user