带有One Note Javascript API的嵌套节组



我注意到,在One-Note Web中,您不能在如下的节组中嵌套节组:

Sports (Section Group)
Basketball (Section Group)
Teams (Section Group)
Toronto Raptors (Section)
Raptors update1 (page)
Raptors update2 (page)
Los Angeles Lakers (Section)
Lakers update1 (page)
Lakers update2 (page)
Hockey (Section Group)
Teams (Section Group)
Vancouver Canucks (Section)
Canucks update1 (page)
Calgary Flames (Section)
Flames update1 (page)

但使用OneNote 2016和Windows 10附带的OneNote Desktop也可以做到这一点。

我正在尝试使用OneNoteJs API从父分区组中提取子分区组,这是否意味着不可能,因为前端不支持它?

谢谢。

var companiesSectionGroups = sectionGroups.getByName("Companies");
companiesSectionGroups.load("sectionGroups");
var sectionGroup;
var nestedSectionGroup;
return context.sync()
.then(function () {
nestedSectionGroup = companiesSectionGroups.items[0];
nestedSectionGroup.load("sectionGroups");
return context.sync()
}).then(function () {
console.log(nestedSectionGroup);
nestedSectionGroup.sectionGroups.items.forEach(function (i) {
console.log(i.name);
return context.sync();
})
return context.sync();
})

我明白了,就是这个。您必须加载第一个分区组,然后加载嵌套分区组,才能访问它。谢谢。

最新更新