From 28eddb8fc05b28fbe13521e0f377d579223b816f Mon Sep 17 00:00:00 2001 From: Sahatsawat Kanpai Date: Wed, 22 Jan 2025 13:11:41 +0700 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20finally=20handle=20the=20mathlive?= =?UTF-8?q?=20fontSize=20in=20ckeditor=20after=20the=20import=20word,=20go?= =?UTF-8?q?t=20@esi=5Fpackage/ckeditor5-import@0.0.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/import.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/import.ts b/src/import.ts index f909e87..2e55397 100644 --- a/src/import.ts +++ b/src/import.ts @@ -74,7 +74,9 @@ export default class Import extends Plugin { const scriptElement = document.createElement("script"); scriptElement.type = "math/tex"; scriptElement.textContent = latex; - mathmlElement.replaceWith(scriptElement); + const spanElement = document.createElement("span"); + spanElement.appendChild(scriptElement); + mathmlElement.replaceWith(spanElement); }); // font-family for concat with , serif const spans = body.querySelectorAll("span");