This commit is contained in:
Vanessa 2023-11-14 12:58:45 +08:00
parent 092c58f629
commit 70e6a3182d
23 changed files with 382 additions and 136 deletions

View file

@ -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;
}