mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 09:30:14 +01:00
🐛 表格内粘贴代码块
This commit is contained in:
parent
82cdbcba57
commit
597d440947
1 changed files with 14 additions and 1 deletions
|
|
@ -246,13 +246,26 @@ export const keymap = {
|
|||
this.value = "";
|
||||
});
|
||||
}
|
||||
} else if (event.key === "》") {
|
||||
keymapStr += ">";
|
||||
} else if (event.key === "《") {
|
||||
keymapStr += "<";
|
||||
} else if (event.key === "—") {
|
||||
keymapStr += "-";
|
||||
} else {
|
||||
keymapStr += event.key.length > 1 ? event.key : event.key.toUpperCase();
|
||||
}
|
||||
}
|
||||
|
||||
this.setAttribute("data-value", keymapStr);
|
||||
if (event.key === "—") {
|
||||
// Mac 中文下会添加"——"
|
||||
setTimeout(() => {
|
||||
this.value = updateHotkeyTip(keymapStr);
|
||||
});
|
||||
} else {
|
||||
this.value = updateHotkeyTip(keymapStr);
|
||||
}
|
||||
clearTimeout(timeout);
|
||||
timeout = window.setTimeout(() => {
|
||||
const keys = this.getAttribute("data-key").split(Constants.ZWSP);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue