1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-04-21 22:02:05 +02:00

update k key handler in core plugin

This commit is contained in:
Ian Storm Taylor 2016-11-29 16:59:28 -08:00
parent 1fd27578fa
commit 2b10e270c6

View File

@ -519,12 +519,9 @@ function Plugin(options = {}) {
function onKeyDownK(e, data, state) {
if (!IS_MAC || !data.isCtrl) return
const { startOffset, startBlock } = state
return state
.transform()
.deleteForward(startBlock.length - startOffset)
.deleteLineForward()
.apply()
}