mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-03 23:38:49 +01:00
This commit is contained in:
parent
88f9318e0b
commit
15e40d2c2b
6 changed files with 13 additions and 10 deletions
|
|
@ -29,10 +29,12 @@ export const loadPlugins = async (app: App) => {
|
|||
loadPluginJS(app, item);
|
||||
css += item.css || "" + "\n";
|
||||
});
|
||||
const styleElement = document.createElement("style");
|
||||
styleElement.id = "pluginsStyle";
|
||||
styleElement.textContent = css;
|
||||
document.head.append(styleElement);
|
||||
const pluginsStyle = document.getElementById("pluginsStyle")
|
||||
if (pluginsStyle) {
|
||||
pluginsStyle.innerHTML = css;
|
||||
} else {
|
||||
document.head.insertAdjacentHTML("beforeend", `<style id="pluginsStyle">${css}</style>`);
|
||||
}
|
||||
};
|
||||
|
||||
const loadPluginJS = async (app: App, item: IPluginData) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue