In macOS for the outlook add-in If there are bullet points in the e-mail body like below,
- The first bullet point.
- The second bullet point.
when I get the HTML with the below method/code.
Office.context.mailbox.item.body.getAsync(Office.CoercionType.Html, function (asyncResult) {
if (asyncResult.status === Office.AsyncResultStatus.Succeeded) {
const html = asyncResult.value;
})
It returns the html and in that, the bullet points are in the below format.
<p class=MsoListParagraph style='text-indent:0cm'><span lang=EN-US>The first
bullet point.</span></p>
<p class=MsoListParagraph style='text-indent:0cm'><span lang=EN-US>The second
bullet point.</span></p>
But when I set back the same html using the setAsync() method the bullet points are automatically removed from the e-mail body.
After setting back the html in e-mail body the bullet points aren't visible.
In windows it worked fine as the Html returned by getAsync() is different it contains the
I tried by manipulating the html and changing the tag with
Basically I tried to convert the HTML got in mac outlook add-in similar to the HTML we get from windows outlook. but I was unable to preserve their styles and CSS.
What I am Expecting: -
When I set back the html it should preserve the style, css and type of the bullet point so that the bullet is not removed from e-mail body and also be on the same position where user created it.