🏁 pre-process list tag li
This commit is contained in:
parent
28eddb8fc0
commit
25ac23c3ae
@ -90,6 +90,21 @@ export default class Import extends Plugin {
|
|||||||
span.setAttribute("style", `${span.getAttribute("style")}; font-size: ${fontSize}`);
|
span.setAttribute("style", `${span.getAttribute("style")}; font-size: ${fontSize}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const li = span.parentElement;
|
||||||
|
if (li && li.tagName === "LI") {
|
||||||
|
const fontSize = li.style.fontSize;
|
||||||
|
if (fontSize) {
|
||||||
|
span.setAttribute("style", `${span.getAttribute("style")}; font-size: ${fontSize}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const pp = span.parentElement?.parentElement;
|
||||||
|
if (pp && span.parentElement.tagName === "A") {
|
||||||
|
const fontSize = pp.style.fontSize;
|
||||||
|
if (fontSize) {
|
||||||
|
span.setAttribute("style", `${span.getAttribute("style")}; font-size: ${fontSize}`);
|
||||||
|
console.log("OwOUwU");
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
console.log("Converted HTML:", body.innerHTML);
|
console.log("Converted HTML:", body.innerHTML);
|
||||||
this.editor.setData(body.innerHTML);
|
this.editor.setData(body.innerHTML);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user