Table of contents

Public interface

Signature
interface TLEditorOptions {}
Source

packages/editor/src/lib/editor/Editor.ts


Properties

autoFocus

Public propertysignature

Whether to automatically focus the editor when it mounts.

Signature
autoFocus?: boolean

cameraOptions

Public propertysignature

Options for the editor's camera.

Signature
cameraOptions?: Partial<TLCameraOptions>
References

TLCameraOptions


getContainer

Public propertysignature

Should return a containing html element which has all the styles applied to the editor. If not given, the body element will be used.

Signature
getContainer: () => HTMLElement

inferDarkMode

Public propertysignature

Whether to infer dark mode from the user's system preferences. Defaults to false.

Signature
inferDarkMode?: boolean

initialState

Public propertysignature

The editor's initial active tool (or other state node id).

Signature
initialState?: string

shapeUtils

Public propertysignature

An array of shapes to use in the editor. These will be used to create and manage shapes in the editor.

Signature
shapeUtils: readonly TLShapeUtilConstructor<TLUnknownShape>[]
References

TLShapeUtilConstructor, TLUnknownShape


store

Public propertysignature

The Store instance to use for keeping the app's data. This may be prepopulated, e.g. by loading from a server or database.

Signature
store: TLStore
References

TLStore


tools

Public propertysignature

An array of tools to use in the editor. These will be used to handle events and manage user interactions in the editor.

Signature
tools: readonly TLStateNodeConstructor[]
References

TLStateNodeConstructor


user

Public propertysignature

A user defined externally to replace the default user.

Signature
user?: TLUser

TLEditorComponentsTLEnterEventHandler