3

I'm trying to create a simple OneNote page with the nested unordered list from PowerApps. The code is:

'OneNote(Business)'.CreatePageInSection(
        SelectedNoteBook.Key,
        SelectedSection.pagesUrl,
        "<!DOCTYPE html><html lang='en-US'><head><title>{NoteDate}</title><meta http-equiv='Content-Type' content='text/html; charset=utf-8'/></head><body data-absolute-enabled='true' style='font-family:Calibri;font-size:12pt'><div data-id='_default' style='position:absolute;left:48px;top:120px;width:624px'><ul><li>Parent<ul><li><span>Child</span></li></ul></li></ul></body></html>"
    );

The problem is that in OneNote 2016 the result looks like here:

OneNote2016 page

it contains a blank line between Parent and Child, and also quotes are added on another div element. Though Graph Explorer shows proper markup (except those quotes):

<html lang="en-US">
<head>
    <title>{NoteDate}</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body data-absolute-enabled="true" style="font-family:Calibri;font-size:11pt">
    <div data-id="_default" style="position:absolute;left:48px;top:120px;width:624px">
        <p style="margin-top:5.5pt;margin-bottom:5.5pt">&quot;</p>
        <p style="margin-top:5.5pt;margin-bottom:5.5pt">&quot;</p>
    </div>
    <div data-id="_default" style="position:absolute;left:48px;top:120px;width:624px">
        <ul>
            <li><p style="margin-top:0pt;margin-bottom:0pt"><span style="font-size:12pt">Parent</span></p>
            <ul>
                <li><span style="font-size:12pt">Child</span></li>
            </ul>
            </li>
        </ul>
        <br />
    </div>
</body>

Does anyone knows how to avoid this?

Andrey.Dankevich
  • 489
  • 5
  • 11

0 Answers0