TheDocumentation Index
Fetch the complete documentation index at: https://docs.tsdraw.com/llms.txt
Use this file to discover all available pages before exploring further.
Editor is the main entry point into the tsdraw engine. It coordinates the document store, viewport, input, tools, and rendering.
In @tsdraw/react, access it via onMount:
Subsystems
| Subsystem | Property | Description |
|---|---|---|
| Store | editor.store | Shape data and ordering |
| Viewport | editor.viewport | Camera x, y, and zoom |
| Tools | editor.tools | Active tool and state routing |
| Renderer | editor.renderer | Canvas 2D rendering |
Managing shapes
Draw styles
New shapes inherit the current style:- color — CSS color or palette key
- size —
's','m','l','xl' - dash —
'draw','solid','dashed','dotted' - fill —
'none','semi','solid','blank'