Whiteboard currently works only with PDF documents. See PDF setup first.
Quick start
To disable the whiteboard layer entirely, set
modules.whiteboard to false:Tools / modes
- select — default; select/drag/resize, drop stickers/text
- draw — draw strokes only
- erase — erases strokes only
- text — click to add text
API methods
All APIs are exposed viasuperdoc.whiteboard.
register
Register palette items (e.g. stickers, comments).
For stickers, src is an image URL and can point to common browser-supported formats (for example: svg, png, jpg, webp, or data URL).
Sticker drag-and-drop checklist
For sticker drag/drop, keep the id contract explicit:- Register sticker ids when whiteboard is created.
- Set
application/stickerto the exact sticker id on drag start. - Use
text/plainonly as optional fallback content (empty string is fine).
text/plain.
getType
Get registered items by type.
setTool
Set the current tool: select, draw, erase, text.

