mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-07-31 20:40:19 +02:00
update k key handler in core plugin
This commit is contained in:
@@ -519,12 +519,9 @@ function Plugin(options = {}) {
|
|||||||
|
|
||||||
function onKeyDownK(e, data, state) {
|
function onKeyDownK(e, data, state) {
|
||||||
if (!IS_MAC || !data.isCtrl) return
|
if (!IS_MAC || !data.isCtrl) return
|
||||||
|
|
||||||
const { startOffset, startBlock } = state
|
|
||||||
|
|
||||||
return state
|
return state
|
||||||
.transform()
|
.transform()
|
||||||
.deleteForward(startBlock.length - startOffset)
|
.deleteLineForward()
|
||||||
.apply()
|
.apply()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user