Message API/docs/components/annotation/clear

Clear

Manage complex documentation sessions by resetting tools.

Overview

Effective document control requires a clean workspace. Use clear commands to reset the active tool context and return to standard selection mode whenever a coordination task is complete.

The `clear` command ensures that field teams can quickly switch from active markup back to document navigation without technical friction.

How to Integrate

Clearing the viewer state is the simplest command in the suite. It doesn't need a specific group or action; it just resets everything at once.

Basic activation

Reset the viewer and return to selection mode.

iframeEl.contentWindow.postMessage({
  type: 'toolControl',
  payload: { command: 'clear' }
}, viewerOrigin);