diff --git a/src/import.ts b/src/import.ts index c211814..c65c01f 100644 --- a/src/import.ts +++ b/src/import.ts @@ -76,6 +76,20 @@ export default class Import extends Plugin { scriptElement.textContent = latex; mathmlElement.replaceWith(scriptElement); }); + // font-family for concat with , serif + const spans = body.querySelectorAll("span"); + spans.forEach(span => { + span.style.fontFamily += ", serif"; + // check if it's

tag has font-size attribute, then apply to tag + const p = span.parentElement; + if (p && p.tagName === "P") { + const fontSize = p.style.fontSize; + if (fontSize) { + span.style.fontSize = fontSize; + } + } + }); + console.log("Converted HTML:", body.innerHTML); this.editor.setData(body.innerHTML); } catch (error) { console.error("Error uploading file:", error);