TldrawEditorWithoutStoreProps
Table of contents
Extends TLStoreBaseOptions.
Props for the Tldraw and TldrawEditor components, when not passing in a TLStore directly. If you would like to pass in a store directly, use TldrawEditorWithStoreProps.
interface TldrawEditorWithoutStoreProps extends TLStoreBaseOptions {}Properties
assets
How should this store upload & resolve assets?
assets?: TLAssetStore;defaultName
The default name for the store.
defaultName?: string;initialData
The initial data for the store.
initialData?: SerializedStore<TLRecord>;migrations
Additional migrations to use in the store
migrations?: readonly MigrationSequence[];persistenceKey
If you would like to persist the store to the browser's local IndexedDB storage and sync it across tabs, provide a key here. Each key represents a single tldraw document.
persistenceKey?: string;sessionId
sessionId?: string;snapshot
A starting snapshot of data to pre-populate the store. Do not supply both this and initialData.
snapshot?: TLEditorSnapshot | TLStoreSnapshot;store
store?: undefined;themes
Named theme definitions. When provided, custom color names are automatically registered before the store is constructed so persisted data with those colors passes validation on load.
themes?: Partial<TLThemes>;users
How should this store resolve users for attribution?
users?: TLUserStore;Methods
onMount
Called when the store is connected to an Editor.
Parameters
| Name | Description |
|---|---|
|
Returns
(() => void) | void;