mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user