finally handle the mathlive fontSize in ckeditor after the import word, got @esi_package/ckeditor5-import@0.0.1

This commit is contained in:
Sahatsawat Kanpai 2025-01-22 13:11:41 +07:00
parent a0b4713b0c
commit 28eddb8fc0

View File

@ -74,7 +74,9 @@ export default class Import extends Plugin {
const scriptElement = document.createElement("script"); const scriptElement = document.createElement("script");
scriptElement.type = "math/tex"; scriptElement.type = "math/tex";
scriptElement.textContent = latex; scriptElement.textContent = latex;
mathmlElement.replaceWith(scriptElement); const spanElement = document.createElement("span");
spanElement.appendChild(scriptElement);
mathmlElement.replaceWith(spanElement);
}); });
// font-family for <span> concat with , serif // font-family for <span> concat with , serif
const spans = body.querySelectorAll("span"); const spans = body.querySelectorAll("span");