PoiScript / docx-rs

A Rust library for parsing and generating docx files.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Inline style

PoiScript opened this issue · comments

<w:p>
  <w:pPr>
    <w:spacing w:before="120" w:after="120"/>
    <w:ind w:left="720" w:right="720"/>
    <w:rPr>
      <w:sz w:val="18"/>
    </w:rPr>
  </w:pPr>
  <w:r>
    <w:rPr>
      <w:sz w:val="18"/>
    </w:rPr>
    <w:t xml:space="preserve">Humpty Dumpty sat on a wall. </w:t>
  </w:r>
</w:p>

Possible API design:

docx
  .create_para_with_style(Style::default().with_sz(18))
  .add_text_with_style("hello, world", Style::default().with_sz(18));