// add text contents with styles

import { CreateDocx, OptionsText } from "../../../build";
import * as fs from "fs";

const docx = new CreateDocx();

const textA: OptionsText = {
    bold: true,
    italic: true,
    fontSize: 14,
    text: "New content",
};
const textB: OptionsText = {
    color: "0000FF",
    font: "Times New Roman",
    text: " & other content.",
};
docx.addText([textA, textB]);

docx.save().then(contents => {
    fs.writeFileSync("addText_2.docx", Buffer.from(contents));
});
