mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 16:40:13 +01:00
This commit is contained in:
parent
75184685b6
commit
3c04ad31a8
13 changed files with 269 additions and 111 deletions
|
|
@ -597,6 +597,8 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => {
|
|||
});
|
||||
sourceElements.forEach(item => {
|
||||
item.classList.remove("protyle-wysiwyg--select", "protyle-wysiwyg--hl");
|
||||
item.removeAttribute("select-start");
|
||||
item.removeAttribute("select-end");
|
||||
// 反链提及有高亮,如果拖拽到正文的话,应移除
|
||||
item.querySelectorAll('[data-type="search-mark"]').forEach(markItem => {
|
||||
markItem.outerHTML = markItem.innerHTML;
|
||||
|
|
@ -778,6 +780,8 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => {
|
|||
if (nodeElement) {
|
||||
if ((window.siyuan.dragElement?.getAttribute("data-selected-ids") || "").indexOf(nodeElement.getAttribute("data-node-id")) === -1) {
|
||||
nodeElement.classList.remove("protyle-wysiwyg--select");
|
||||
nodeElement.removeAttribute("select-start");
|
||||
nodeElement.removeAttribute("select-end");
|
||||
}
|
||||
nodeElement.classList.remove("dragover__top", "dragover__bottom", "dragover__left", "dragover__right");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue