🎨 disabled heading to code block

This commit is contained in:
Vanessa 2023-04-17 22:10:51 +08:00
parent c8177c262e
commit 940812d251

View File

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