mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 17:40:13 +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 = "";
|
this.value = "";
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
} else if (event.key === "》") {
|
||||||
|
keymapStr += ">";
|
||||||
|
} else if (event.key === "《") {
|
||||||
|
keymapStr += "<";
|
||||||
|
} else if (event.key === "—") {
|
||||||
|
keymapStr += "-";
|
||||||
} else {
|
} else {
|
||||||
keymapStr += event.key.length > 1 ? event.key : event.key.toUpperCase();
|
keymapStr += event.key.length > 1 ? event.key : event.key.toUpperCase();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setAttribute("data-value", keymapStr);
|
this.setAttribute("data-value", keymapStr);
|
||||||
|
if (event.key === "—") {
|
||||||
|
// Mac 中文下会添加"——"
|
||||||
|
setTimeout(() => {
|
||||||
this.value = updateHotkeyTip(keymapStr);
|
this.value = updateHotkeyTip(keymapStr);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.value = updateHotkeyTip(keymapStr);
|
||||||
|
}
|
||||||
clearTimeout(timeout);
|
clearTimeout(timeout);
|
||||||
timeout = window.setTimeout(() => {
|
timeout = window.setTimeout(() => {
|
||||||
const keys = this.getAttribute("data-key").split(Constants.ZWSP);
|
const keys = this.getAttribute("data-key").split(Constants.ZWSP);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue