Add OutlineLevel Paragraph property

This commit is contained in:
fmuscolino
2019-01-15 15:39:48 +01:00
parent 383c6d769f
commit b0ee0305fb
5 changed files with 61 additions and 1 deletions

View File

@ -666,4 +666,18 @@ describe("Paragraph", () => {
});
});
});
describe("#outlineLevel", () => {
it("should set paragraph outline level to the given value", () => {
paragraph.outlineLevel("0");
const tree = new Formatter().format(paragraph);
expect(tree).to.deep.equal({
"w:p": [
{
"w:pPr": [{ "w:outlineLvl": [{ _attr: { "w:val": "0" } }] }],
},
],
});
});
});
});