0
有一个用于在OneNote中获取墨迹笔划对象的API。根据示例/ documentation,您可以运行获取InkStroke对象的代码。我的理解是,荧光笔笔画是OneNote对象模型中的FloatingInk。是否有可能获得关于中风本身的信息?例如:OneNote InkStroke/FloatingInk API
if(inkObject.getType() == "Highlighter") {
var width = inkObject.getStroke().width;
var height = inkObject.getStroke().height;
}
该文档显示了下面的示例,但它似乎只是使“id”属性可用。
OneNote.run(function(context) {
// Gets the active page.
var page = context.application.getActivePage();
var contents = page.contents;
// Load page contents and their types.
page.load('contents/type');
return context.sync()
.then(function(){
// Load every ink content.
$.each(contents.items, function(i, content) {
if (content.type == "Ink"){
content.load('ink/id');
}
})
return context.sync();
})
.then(function(){
// Log ID of every ink content.
$.each(contents.items, function(i, content) {
if (content.type == "Ink"){
console.log(content.ink.id);
}
})
});
})
.catch(function(error) {
console.log("Error: " + error);
if (error instanceof OfficeExtension.Error) {
console.log("Debug info: " + JSON.stringify(error.debugInfo));
}
});
新增的UserVoice –
请求你将如何从加载项获得RestApiId? –
Here:https://stackoverflow.com/questions/44753454/getrestapiid-function-in-objects-from-office-js-for-onenote –