mirror of
https://github.com/chrstn67/WonderBox.git
synced 2026-07-22 05:31:43 +00:00
MAJ lien CSS
This commit is contained in:
parent
44ebd76bc1
commit
dd09d68ef9
2 changed files with 6 additions and 4 deletions
8
main.js
8
main.js
|
|
@ -3,7 +3,7 @@ const { Plugin } = require("obsidian");
|
|||
module.exports = class MyPlugin extends Plugin {
|
||||
async onload() {
|
||||
// Charger les styles CSS depuis un fichier local
|
||||
this.loadStyles();
|
||||
await this.loadStyles();
|
||||
|
||||
// Inscription d'un processeur de post-traitement de markdown
|
||||
this.registerMarkdownPostProcessor((element) => {
|
||||
|
|
@ -12,8 +12,10 @@ module.exports = class MyPlugin extends Plugin {
|
|||
}
|
||||
|
||||
// Fonction pour charger les styles CSS dynamiquement
|
||||
loadStyles() {
|
||||
const stylePath = `${this.manifest.dir}/styles.css`; // Obtenir le chemin relatif au fichier CSS
|
||||
async loadStyles() {
|
||||
const stylePath = this.app.vault.adapter.getResourcePath(
|
||||
`${this.manifest.dir}/styles.css`
|
||||
); // Obtenir un chemin valide
|
||||
const link = document.createElement("link");
|
||||
link.rel = "stylesheet";
|
||||
link.href = stylePath;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "wonderbox",
|
||||
"name": "WonderBox",
|
||||
"version": "1.0.9",
|
||||
"version": "1.0.10",
|
||||
"minAppVersion": "0.12.0",
|
||||
"description": "Create more relevant text sections your tips, top notes, warnings and more.",
|
||||
"author": "Christian Humbert",
|
||||
|
|
|
|||
Loading…
Reference in a new issue