mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 08:48:49 +01:00
🎨 数据库标题粘贴光标问题
This commit is contained in:
parent
81b0a9385b
commit
a129ccc497
1 changed files with 5 additions and 2 deletions
|
|
@ -4,7 +4,7 @@ import {transaction, updateTransaction} from "../wysiwyg/transaction";
|
|||
import {getContenteditableElement} from "../wysiwyg/getBlock";
|
||||
import {
|
||||
fixTableRange,
|
||||
focusBlock,
|
||||
focusBlock, focusByRange,
|
||||
focusByWbr,
|
||||
getEditorRange,
|
||||
getSelectionOffset, setLastNodeRange,
|
||||
|
|
@ -235,8 +235,11 @@ const processAV = (range: Range, html: string, protyle: IProtyle, blockElement:
|
|||
}
|
||||
document.querySelector(".av__panel")?.remove();
|
||||
} else if (hasClosestByClassName(range.startContainer, "av__title")) {
|
||||
range.insertNode(document.createTextNode(text));
|
||||
const node = document.createTextNode(text)
|
||||
range.insertNode(node);
|
||||
range.setEnd(node, text.length);
|
||||
range.collapse(false);
|
||||
focusByRange(range)
|
||||
updateAVName(protyle, blockElement);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue