Microsoft graph api 如何使用microsoft graph更改onenote元素的绝对位置
我试图更改OneNote div的绝对位置,但未成功。 我可以用绝对定位的div创建全身: 这是我的要求:Microsoft graph api 如何使用microsoft graph更改onenote元素的绝对位置,microsoft-graph-api,onenote-api,microsoft-graph-onenote,Microsoft Graph Api,Onenote Api,Microsoft Graph Onenote,我试图更改OneNote div的绝对位置,但未成功。 我可以用绝对定位的div创建全身: 这是我的要求: [ { 'target':'body', 'action':'replace', 'content':'<body data-absolute-enabled="true"> <p>This content will appear in the _default div.</p> <
[
{
'target':'body',
'action':'replace',
'content':'<body data-absolute-enabled="true">
<p>This content will appear in the _default div.</p>
<div style="position:absolute;top:175px;left:100px" data-id="div1">
<p>This content will appear in an absolute positioned div.</p>
</div>
<div>
<p>This content will also appear in the _default div.</p>
</div>
</body>'
}
]
[
{
'target':'body',
“操作”:“替换”,
'内容':'
此内容将显示在_defaultdiv中
此内容将显示在绝对定位的div中
此内容也将出现在_defaultdiv中
'
}
]
这是输出html(可以):
x2222x
此内容将显示在_defaultdiv中
此内容也将出现在_defaultdiv中
此内容将显示在绝对定位的div中
但是,我不能改变这个位置,我需要“移动”div1。如何将绝对位置更改为特定的div
这是我请求“移动”div1(按id)的请求,但它不起作用:
PACH https://graph.microsoft.com/v1.0/me/onenote/pages/{my_page_id}/content
[
{
'target':'div:{ef5cb98c-74e7-4c65-b51a-0adbc66d9c97}{229}',
'action':'replace',
'content':'<div style="position:absolute;top:350px;left:200px" data-id="div1">
<p>This content will appear in an absolute positioned div (updated).</p>
</div>'
}
]
PACHhttps://graph.microsoft.com/v1.0/me/onenote/pages/{my_page_id}/content
[
{
'target':'div:{ef5cb98c-74e7-4c65-b51a-0adbc66d9c97}{229}',
“操作”:“替换”,
'内容':'
此内容将显示在绝对定位的div中(已更新)
'
}
]
谢谢你 您正在尝试移动包含其内容的div吗?你得到了什么结果?“替换”将在指定的位置参数上创建新的过时div。这就是你所期望的吗?是的,我需要把它和它的内容移动到一个特定的位置。
PACH https://graph.microsoft.com/v1.0/me/onenote/pages/{my_page_id}/content
[
{
'target':'div:{ef5cb98c-74e7-4c65-b51a-0adbc66d9c97}{229}',
'action':'replace',
'content':'<div style="position:absolute;top:350px;left:200px" data-id="div1">
<p>This content will appear in an absolute positioned div (updated).</p>
</div>'
}
]