Uh oh!
There was an error while loading. Please reload this page.
This repository was archived by the owner on Sep 10, 2025. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork 18
Utilities
Chad Shurtz edited this page Aug 30, 2016
·
1 revision
A set of utility functions are provided at notebookUtils.ts to allow the application developer to traverse notebooks.
These utilities are a WIP, and more will be added in the future.
OneNoteApi.NotebookUtils.sectionExistsInNotebooks(notebooks/* Notebook[] */,sectionId/* string */);// true/falseOneNoteApi.NotebookUtils.sectionExistsInParent(parent/* Notebook | SectionGroup */,sectionId/* string */);// true/false// Returns section path (e.g., [Notebook, SectionGroup, ..., Section]OneNoteApi.NotebookUtils.getPathFromNotebooksToSection(notebooks/* Notebook[] */,function(section){returnsection.name==="The section I want";});OneNoteApi.NotebookUtils.getPathFromParentToSection(parent/* Notebook | SectionGroup */,function(section){returnsection.name==="The section I want"});OneNoteApi.NotebookUtils.getDepthOfNotebooks(notebooks/* Notebook[] */);// NumberOneNoteApi.NotebookUtils.getDepthOfParent(parent/* Notebook | SectionGroup */);// Number