mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-23 16:56:10 +01:00
🚨
This commit is contained in:
parent
2a214fe50e
commit
e8ade79630
7 changed files with 12 additions and 16 deletions
|
|
@ -468,7 +468,7 @@ const renderPDF = (id: string) => {
|
|||
nodeIntegration: true,
|
||||
webviewTag: true,
|
||||
webSecurity: false,
|
||||
autoplayPolicy: 'user-gesture-required' // 桌面端禁止自动播放多媒体 https://github.com/siyuan-note/siyuan/issues/7587
|
||||
autoplayPolicy: "user-gesture-required" // 桌面端禁止自动播放多媒体 https://github.com/siyuan-note/siyuan/issues/7587
|
||||
},
|
||||
});
|
||||
ipcRenderer.send(Constants.SIYUAN_EXPORT_PREVENT, window.siyuan.printWin.id);
|
||||
|
|
|
|||
|
|
@ -16,24 +16,24 @@ export const previewTemplate = (pathString: string, element: Element, parentId:
|
|||
const mergeElement = (a: Element, b: Element, after = true) => {
|
||||
a.setAttribute("data-type", a.getAttribute("data-type").replace("search-mark", "").trim());
|
||||
b.setAttribute("data-type", b.getAttribute("data-type").replace("search-mark", "").trim());
|
||||
const attributes = a.attributes
|
||||
let isMatch = true
|
||||
const attributes = a.attributes;
|
||||
let isMatch = true;
|
||||
for (let i = 0; i < attributes.length; i++) {
|
||||
if (b.getAttribute(attributes[i].name) !== attributes[i].value) {
|
||||
isMatch = false
|
||||
isMatch = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (isMatch) {
|
||||
if (after) {
|
||||
a.innerHTML = a.innerHTML + b.innerHTML
|
||||
a.innerHTML = a.innerHTML + b.innerHTML;
|
||||
} else {
|
||||
a.innerHTML = b.innerHTML + a.innerHTML
|
||||
a.innerHTML = b.innerHTML + a.innerHTML;
|
||||
}
|
||||
b.remove();
|
||||
}
|
||||
return isMatch;
|
||||
}
|
||||
};
|
||||
|
||||
export const removeSearchMark = (element: HTMLElement) => {
|
||||
let previousElement = element.previousSibling as HTMLElement;
|
||||
|
|
@ -56,4 +56,4 @@ export const removeSearchMark = (element: HTMLElement) => {
|
|||
if (element.getAttribute("data-type").includes("search-mark")) {
|
||||
element.setAttribute("data-type", element.getAttribute("data-type").replace("search-mark", "").trim());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -7,12 +7,10 @@ import {
|
|||
getSelectionOffset,
|
||||
setFirstNodeRange,
|
||||
} from "../util/selection";
|
||||
import {fullscreen, netImg2LocalAssets} from "../breadcrumb/action";
|
||||
import {setPadding} from "../ui/initUI";
|
||||
import {netImg2LocalAssets} from "../breadcrumb/action";
|
||||
/// #if !MOBILE
|
||||
import {openBacklink, openGraph, openOutline} from "../../layout/dock/util";
|
||||
/// #endif
|
||||
import {reloadProtyle} from "../util/reload";
|
||||
import {getContenteditableElement, hasNextSibling, hasPreviousSibling} from "./getBlock";
|
||||
import {hasClosestByMatchTag} from "../util/hasClosest";
|
||||
import {hideElements} from "../ui/hideElements";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue