TldrawEditorProps

Public TypeAlias

Signature
type TldrawEditorProps = {
  children?: any
  shapes?: Record<string, TLShapeInfo>
  tools?: TLStateNodeConstructor[]
  assetUrls?: TLEditorAssetUrls
  autoFocus?: boolean
  components?: Partial<TLEditorComponents>
  onMount?: (editor: Editor) => void
  onCreateAssetFromFile?: (file: File) => Promise<TLAsset>
  onCreateBookmarkFromUrl?: (url: string) => Promise<{
    image: string
    title: string
    description: string
  }>
} & (
  | {
      store: TLStore | TLStoreWithStatus
    }
  | {
      store?: undefined
      initialData?: StoreSnapshot<TLRecord>
      persistenceKey?: string
      sessionId?: string
      defaultName?: string
    }
)
References

Record, TLShapeInfo, TLStateNodeConstructor, TLEditorAssetUrls, Partial, TLEditorComponents, Editor, File, Promise, TLAsset, TLStore, TLStoreWithStatus, StoreSnapshot, TLRecord

Edit this page
Last edited on 6 June 2023
TldrawEditorTLEditorAssetUrls