mirror of
https://github.com/purocean/yn.git
synced 2026-10-12 23:31:39 +08:00
upd: update table editing
This commit is contained in:
@@ -189,8 +189,15 @@ async function editTableCell (start: number, end: number, cellIndex: number, inp
|
||||
cancel()
|
||||
}
|
||||
|
||||
if (e.key === 'Enter' && hasCtrlCmd(e)) {
|
||||
ok()
|
||||
if (e.key === 'Enter') {
|
||||
// insert br
|
||||
if (e.shiftKey || hasCtrlCmd(e)) {
|
||||
const startPos = input.selectionStart
|
||||
const endPos = input.selectionEnd
|
||||
input.value = input.value.substring(0, startPos) + '\n' + input.value.substring(endPos)
|
||||
} else {
|
||||
ok()
|
||||
}
|
||||
}
|
||||
}
|
||||
}))
|
||||
|
||||
Reference in New Issue
Block a user