TldrawEditorConfig

Public Class

Table of Contents
Signature
class TldrawEditorConfig {}

Constructor

Public Constructor

Constructs a new instance of the TldrawEditorConfig class

Parameters
NameDescription

args

{
  shapes?: readonly TLShapeDef<any, any>[]
  tools?: readonly StateNodeConstructor[]
  allowUnknownShapes?: boolean
  derivePresenceState?: (
    store: TLStore
  ) => Signal<null | TLInstancePresence>
}
References

TLShapeDef, StateNodeConstructor, TLStore, Signal, TLInstancePresence


Properties

default

Public Static Readonly Property

Signature
static readonly default: TldrawEditorConfig
References

TldrawEditorConfig


shapes

Public Readonly Property

Signature
readonly shapes: readonly TLUnknownShapeDef[]
References

TLUnknownShapeDef


storeSchema

Public Readonly Property

Signature
readonly storeSchema: StoreSchema<TLRecord, TLStoreProps>
References

StoreSchema, TLRecord, TLStoreProps


TLShape

Public Readonly Property

Signature
readonly TLShape: RecordType<TLShape, 'index' | 'parentId' | 'props' | 'type'>
References

RecordType, TLShape


tools

Public Readonly Property

Signature
readonly tools: readonly StateNodeConstructor[]
References

StateNodeConstructor


Methods

createStore()

Public Method

Parameters
NameDescription

config

{
  initialData?: StoreSnapshot<TLRecord>
  userId: TLUserId
  instanceId: TLInstanceId
}
Returns
TLStore
References

StoreSnapshot, TLRecord, TLUserId, TLInstanceId, TLStore


Edit this page
Last edited on 11 May 2023
TldrawEditorTldrawEditorProps