Another api for creating paragraph and style
PoiScript opened this issue · comments
let docx = Docx::new();
// both `style` and `paragraph` are keeped inside
// the docx, no more scope problem to worry
let style = docx.create_style("Test Paragraph Style")
.with_color("FF200")
.with_sz(40);
let mut paragraph = docx.create_paragraph("This text is styled"); // returning a muttable reference
paragraph.with_style_name(&style);