🎨 table 中禁止插入代码块

This commit is contained in:
Vanessa 2025-04-23 21:22:31 +08:00
parent da2d57d316
commit 61e16c8743

View File

@ -1380,7 +1380,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
return true;
}
if (matchHotKey(window.siyuan.config.keymap.editor.insert.code.custom, event) &&
!["NodeCodeBlock", "NodeHeading"].includes(nodeElement.getAttribute("data-type"))) {
!["NodeCodeBlock", "NodeHeading", "NodeTable"].includes(nodeElement.getAttribute("data-type"))) {
const id = nodeElement.getAttribute("data-node-id");
const html = nodeElement.outerHTML;
const editElement = getContenteditableElement(nodeElement);