Change docx folder to more appropriate "file" folder
This commit is contained in:
15
src/file/paragraph/run/run-components/text.ts
Normal file
15
src/file/paragraph/run/run-components/text.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import { XmlAttributeComponent, XmlComponent } from "../../../xml-components";
|
||||
|
||||
class TextAttributes extends XmlAttributeComponent<{space: "default" | "preserve"}> {
|
||||
protected xmlKeys = {space: "xml:space"};
|
||||
}
|
||||
|
||||
export class Text extends XmlComponent {
|
||||
constructor(text: string) {
|
||||
super("w:t");
|
||||
this.root.push(new TextAttributes({space: "preserve"}));
|
||||
if (text) {
|
||||
this.root.push(text);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user