Web SDKv1.0.0

OutlineApi.delete()

Delete the bookmark at a path, its children with it. Needs the edit-pages feature.
methodEditingsince 1.0.0

Signature

delete(path: number[], options?: SignedDocumentOptions): Promise<void>

Parameters

ParameterTypeDescription
pathnumber[]The bookmark's path into get()'s tree.
options?SignedDocumentOptions{ invalidateSignatures? }.

Returns

Promise<void>

Throws

  • INVALID_ARGUMENT — a path that names no bookmark.
  • FEATURE_NOT_LICENSED — the license lacks edit-pages.
  • PAGE_ERROR — the change could not be written.
  • DOCUMENT_CLOSED — the document has been closed.
  • INVALID_STATE — a certified document, unless options.invalidateSignatures (no certification level allows bookmark changes); or a progressive document still downloading.

Example

TypeScript
await doc.outline.delete([0, 2]); // the first bookmark's third child

More in OutlineApi