fix: 改进在反链面板中全选 (#13985)

* fix: 改进在反链面板中全选

fix https://github.com/siyuan-note/siyuan/issues/13874

* fix: 改进在反链面板中全选

fix https://github.com/siyuan-note/siyuan/issues/13874
This commit is contained in:
Jeffrey Chen 2025-02-01 20:33:10 +08:00 committed by GitHub
parent a598f0e0ad
commit 923b8c7e37
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -114,8 +114,11 @@ export const selectAll = (protyle: IProtyle, nodeElement: Element, range: Range)
hideElements(["select"], protyle);
const ids: string [] = [];
Array.from(protyle.wysiwyg.element.children).forEach(item => {
item.classList.add("protyle-wysiwyg--select");
ids.push(item.getAttribute("data-node-id"));
const nodeId = item.getAttribute("data-node-id");
if (nodeId) {
item.classList.add("protyle-wysiwyg--select");
ids.push(nodeId);
}
});
countBlockWord(ids, protyle.block.rootID);
};