question

58882912 avatar image
0 Votes"
58882912 asked

the word document becoms read-only after using function getHtml() in example from https://docs.microsoft.com/ru-ru/javascript/api/word?view=word-js-preview

Summary: the word document becoms read-only after using function getHtml() in example from https://docs.microsoft.com/ru-ru/javascript/api/word?view=word-js-preview
Steps to reproduce:
1. Create Word document, fill any text and save as a Document.docx
2. Install add-in "Contractum" from Store (https://appsource.microsoft.com/en-us/product/office/WA200002843?src=office&tab=Overview)
3. Click "Contractum" tab
4. Click "Аналіз" button
5. Open console for add-in
6. Copy example with function getHtml() from https://docs.microsoft.com/en-us/javascript/api/word/word.body?view=word-js-preview#getHtml__
7. Execute example in the console (the HTML will be printed in the console)
8. Try to place the cursor in the document and start typing
Actual behavior: text is not typing and some buttons in the tabs (Insert, etc) become disable

Expected behavior: text is typing, buttons in the tabs are not disable
128641-image.png
Environment:
Windows 10 Pro 21H1 19043.1165
Chrome 92.0.4515.159 (Official Build) (64 bit)
Word on Web 16.0.14427.41012


office-addins-dev
image.png (232.5 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

0 Answers