UNPKG

docx

Version:

Easily generate .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.

15 lines (11 loc) 474 B
// http://www.datypic.com/sc/ooxml/e-m_chr-1.html import { XmlAttributeComponent, XmlComponent } from "file/xml-components"; class MathAccentCharacterAttributes extends XmlAttributeComponent<{ readonly accent: string }> { protected readonly xmlKeys = { accent: "m:val" }; } export class MathAccentCharacter extends XmlComponent { constructor(accent: string) { super("m:chr"); this.root.push(new MathAccentCharacterAttributes({ accent })); } }