简体   繁体   中英

Office.js (Word 2016) ContentControl getOoxml/insertOoxml

I have a word 2016 document with a number of content controls on the page. I save each content control by using .getOoxml and saving the xml string to the database.

I can then refresh the content control by reading out the string and using insertOoxml. This works for most things but bullet points keep losing their format. For example if I save something like this:

  • Bullet A
  • Bullet B
  • Bullet C

when I refresh it it comes back like this

  1. Bullet A
  2. Bullet B
  3. Bullet C

I have also taken the xml that getOoxml produces and opened it directly with word and it also loses the format.

Is this a bug with the getOoxml api for the content control or is there something I can do to fix this?

I'm not sure if it is directly related to the issue I have but I saw a similar issue on GiHub ( https://github.com/OfficeDev/office-js-docs/issues/272 ) that appears unanswered.

this is a known issue and the fix was shipped with our May fork shipped since July 5th to the public. (Build 16.0.7070.2022+). Please make sure you have the latest update. Please reply with your current build number as well, just to triple check. thanks so much and happy coding!!!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM