mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-04 07:48:49 +01:00
This commit is contained in:
parent
19a01e862d
commit
fbf7d1f174
1 changed files with 3 additions and 1 deletions
|
|
@ -1065,7 +1065,9 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
|
|||
if (!selectText.trim() && (nodeElement.querySelector("tr") || nodeElement.querySelector("span"))) {
|
||||
// 没选中时,都是纯文本就创建子文档 https://ld246.com/article/1663073488381/comment/1664804353295#comments
|
||||
} else {
|
||||
if (!selectText.trim()) {
|
||||
if (!selectText.trim() &&
|
||||
getContenteditableElement(nodeElement).textContent // https://github.com/siyuan-note/siyuan/issues/8099
|
||||
) {
|
||||
selectAll(protyle, nodeElement, range);
|
||||
}
|
||||
const newFileName = replaceFileName(selectText.trim() ? selectText.trim() : protyle.lute.BlockDOM2Content(nodeElement.outerHTML).replace(/\n/g, "")) || "Untitled";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue