การแจกแจงประเภทการจัดข้อความ
หากต้องการเรียกใช้ enum ให้เรียกคลาสหลัก ชื่อ และพร็อพเพอร์ตี้ของ enum นั้น เช่น
DocumentApp.TextAlignment.NORMAL
// Make the first character in the first paragraph of the active tab be // superscript. const documentTab = DocumentApp.getActiveDocument().getActiveTab().asDocumentTab(); const text = documentTab.getBody().getParagraphs()[0].editAsText(); text.setTextAlignment(0, 0, DocumentApp.TextAlignment.SUPERSCRIPT);
พร็อพเพอร์ตี้
พร็อพเพอร์ตี้ | ประเภท | คำอธิบาย |
---|---|---|
NORMAL | Enum | การจัดข้อความแบบปกติ |
SUPERSCRIPT | Enum | การจัดข้อความตัวยก |
SUBSCRIPT | Enum | การจัดข้อความย่อย |