diff --git a/app/src/protyle/hint/extend.ts b/app/src/protyle/hint/extend.ts index a1e105f14..26af5ffb4 100644 --- a/app/src/protyle/hint/extend.ts +++ b/app/src/protyle/hint/extend.ts @@ -37,7 +37,7 @@ export const hintSlash = (key: string, protyle: IProtyle) => { }, { filter: ["文档", "子文档", "wendang", "wd", "ziwendang", "zwd", "xjwd"], value: Constants.ZWSP + 4, - html: `
${window.siyuan.languages.newFile}
`, + html: `
${window.siyuan.languages.newFile}${updateHotkeyTip(window.siyuan.config.keymap.general.newFile.custom)}
`, }, { value: "", html: "separator", diff --git a/app/src/protyle/wysiwyg/enter.ts b/app/src/protyle/wysiwyg/enter.ts index 7ad86a9b8..bbb3266cf 100644 --- a/app/src/protyle/wysiwyg/enter.ts +++ b/app/src/protyle/wysiwyg/enter.ts @@ -1,4 +1,4 @@ -import {genEmptyElement} from "../../block/util"; +import {genEmptyElement, insertEmptyBlock} from "../../block/util"; import {getSelectionOffset, focusByWbr} from "../util/selection"; import { getContenteditableElement, @@ -188,6 +188,8 @@ export const enter = (blockElement: HTMLElement, range: Range, protyle: IProtyle if (isNotEditBlock(blockElement)) { if (blockElement.classList.contains("render-node")) { protyle.toolbar.showRender(protyle, blockElement); + } else if (blockElement.classList.contains("hr")) { + insertEmptyBlock(protyle, "afterend"); } else { protyle.gutter.renderMenu(protyle, blockElement); window.siyuan.menus.menu.element.classList.remove("fn__none");