bokuweb / docx-rs

:memo: A .docx file writer with Rust/WebAssembly.
https://bokuweb.github.io/docx-rs/
MIT License
341 stars 59 forks source link

Is it possible to retrieve formatting for highlighted text? #618

Open steve-the-crab opened 1 year ago

steve-the-crab commented 1 year ago

Hi, I was wondering if it's possible to retrieve formatting data for highlighted text?

I can't see it anywhere in the parsed document's JSON.

If it's not available but possible, where might be a good place to start looking in the code to investigate implementing it?

I believe the XML structure is along the lines of:

<w:p>
  <w:r>
    <w:rPr>
      <w:highlight w:val="yellow" />
    </w:rPr>
    <w:t>This text is highlighted.</w:t>
  </w:r>
</w:p>

Thanks a lot!