mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-11 07:02:33 +01:00
This commit is contained in:
parent
092c58f629
commit
70e6a3182d
23 changed files with 382 additions and 136 deletions
|
|
@ -216,10 +216,16 @@ export const fontEvent = (protyle: IProtyle, nodeElements: Element[], type?: str
|
|||
e.style.textShadow = "";
|
||||
e.style.backgroundColor = "";
|
||||
e.style.fontSize = "";
|
||||
if (e.classList.contains("av")) {
|
||||
e.querySelector(".av__container").setAttribute("style", "--av-background:--b3-theme-background");
|
||||
}
|
||||
} else if (type === "style1") {
|
||||
const colorList = color.split(Constants.ZWSP);
|
||||
e.style.backgroundColor = colorList[0];
|
||||
e.style.color = colorList[1];
|
||||
if (e.classList.contains("av")) {
|
||||
e.querySelector(".av__container").setAttribute("style", `--av-background:${colorList[0]}`);
|
||||
}
|
||||
} else if (type === "style2") {
|
||||
e.style.webkitTextStroke = "0.2px var(--b3-theme-on-background)";
|
||||
e.style.webkitTextFillColor = "transparent";
|
||||
|
|
@ -229,6 +235,9 @@ export const fontEvent = (protyle: IProtyle, nodeElements: Element[], type?: str
|
|||
e.style.color = color;
|
||||
} else if (type === "backgroundColor") {
|
||||
e.style.backgroundColor = color;
|
||||
if (e.classList.contains("av")) {
|
||||
e.querySelector(".av__container").setAttribute("style", `--av-background:${color}`);
|
||||
}
|
||||
} else if (type === "fontSize") {
|
||||
e.style.fontSize = color;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue