mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 09:30:14 +01:00
This commit is contained in:
parent
b0322b589d
commit
b24224f7c4
2 changed files with 2 additions and 2 deletions
|
|
@ -61,7 +61,7 @@ export class Plugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
public addIcons(svg: string) {
|
public addIcons(svg: string) {
|
||||||
document.body.insertAdjacentHTML("afterbegin", `<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" xmlns="http://www.w3.org/2000/svg">
|
document.body.insertAdjacentHTML("afterbegin", `<svg data-name="${this.name}" style="position: absolute; width: 0; height: 0; overflow: hidden;" xmlns="http://www.w3.org/2000/svg">
|
||||||
<defs>${svg}</defs></svg>`);
|
<defs>${svg}</defs></svg>`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,7 @@ export const loadAssets = (data: IAppearance) => {
|
||||||
while (svgElement.tagName === "svg") {
|
while (svgElement.tagName === "svg") {
|
||||||
const currentSvgElement = svgElement;
|
const currentSvgElement = svgElement;
|
||||||
svgElement = svgElement.nextElementSibling;
|
svgElement = svgElement.nextElementSibling;
|
||||||
if (currentSvgElement.id !== "emojiScriptSvg") {
|
if (currentSvgElement.id !== "emojiScriptSvg" && !currentSvgElement.getAttribute("data-name")) {
|
||||||
currentSvgElement.remove();
|
currentSvgElement.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue