diff --git a/sample/ckeditor.ts b/sample/ckeditor.ts index 4094771..fb1f82e 100644 --- a/sample/ckeditor.ts +++ b/sample/ckeditor.ts @@ -140,19 +140,22 @@ ClassicEditor fontFamily: { options: [ 'default', - 'Arial, sans-serif', - 'Georgia, serif', - 'Impact, Charcoal, sans-serif', - 'Lucida Console, Monaco, monospace', - 'Lucida Sans Unicode, Lucida Grande, sans-serif', - 'Tahoma, Geneva, sans-serif', - 'Times New Roman, Times, serif', - 'Trebuchet MS, Helvetica, sans-serif', - 'Verdana, Geneva, sans-serif', - 'TH Sarabun New, sans-serif', - 'Angsana New, serif', - 'EucrosiaUPC, serif', - 'Noto Sans Thai, sans-serif' + // let's add some microsoft word fonts by dictionary but not too much + 'Angsana New', + 'AngsanaUPC', + 'Arial', + 'EucrosiaUPC', + 'FreesiaUPC', + 'JasmineUPC', + 'KodchiangUPC', + 'Leelawadee', + 'Leelawadee UI', + 'Microsoft Sans Serif', + 'PMingLiU', + 'Tahoma', + 'Times New Roman', + 'Trebuchet MS', + 'Verdana' ] }, mathlive: { diff --git a/sample/index.html b/sample/index.html index ac31c8f..49f3dac 100644 --- a/sample/index.html +++ b/sample/index.html @@ -19,33 +19,33 @@
ในการทดลองวัดความยาวของวัตถุชิ้นหนึ่งที่มีความยาวประมาณ
+ ในการทดลองวัดความยาวของวัตถุชิ้นหนึ่งที่มีความยาวประมาณ
6 เซนติเมตร ด้วยไม้บรรทัดที่มีความละเอียด 0.1 เซนติเมตร โดยทำการวัดทั้งหมด 5 ครั้ง ได้ข้อมูลดังนี้ 5.84 6.00 6.26 5.90
+ 5.84 6.00 6.26 5.90
12.25 ถ้าจะต้องรายงานค่าเฉลี่ยของการวัดความยาวครั้งนี้ ถ้าจะต้องรายงานค่าเฉลี่ยของการวัดความยาวครั้งนี้
และรายงานความคลายเคลื่อนของความยาวเฉลี่ย และรายงานความคลายเคลื่อนของความยาวเฉลี่ย
- ด้วยสูตร
- เมื่อ เมื่อ
- และ และ
- คือ ค่าที่มากที่สุด
+ คือ ค่าที่มากที่สุด
และค่าที่น้อยที่สุดของข้อมูล ตามลำดับ ข้อใดแสดงผลการรายงานการวัดความยาวได้ถูกต้อง
+ ข้อใดแสดงผลการรายงานการวัดความยาวได้ถูกต้อง
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;
+ span.setAttribute("style", `${span.getAttribute("style")}; font-size: ${fontSize}`);
}
}
});
diff --git a/src/import.ts b/src/import.ts
index c65c01f..f909e87 100644
--- a/src/import.ts
+++ b/src/import.ts
@@ -79,13 +79,13 @@ export default class Import extends Plugin {
// font-family for concat with , serif
const spans = body.querySelectorAll("span");
spans.forEach(span => {
- span.style.fontFamily += ", serif";
+ // span.style.fontFamily += ", serif";
// check if it's