OfficeDev / office-js

A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
https://learn.microsoft.com/javascript/api/overview
Other
688 stars 94 forks source link

Line spacing issue when using body.getHtml function #5084

Open tahseenmohd opened 4 days ago

tahseenmohd commented 4 days ago

Hi, When we are using body.getHtml() function of the JavaScript it is giving the line spacing and formatting getting changed. Everytime we are editing the content of document, extra line spacing getting added. Attached is the code snippet Code_Si

Quick response highly appreciated. Original Content Same content after inserting for 2nd time Same content after inserting for 5th time

RuizhiSunMS commented 3 days ago

Hi @tahseenmohd, thx for reporting here. May I double confirm that, when you call getHtml(), the spacing and format would get changed together even you do nothing else?

tahseenmohd commented 2 days ago

Yes. We are fetching the html content using body.getHtml() and then encode by using EncodeURIComponent and saving it to .txt file please see the attached screenshot. Thanks. R4

Jupiter644 commented 2 days ago

Hi I am also facing this line spacing issue in WOPI word. Is there a fix to it??