TLEditorOptions

See source code
Table of contents
interface TLEditorOptions {}

Properties

autoFocus

optional

Whether to automatically focus the editor when it mounts.

autoFocus?: boolean

bindingUtils

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

bindingUtils: readonly TLAnyBindingUtilConstructor[]

cameraOptions

optional

Options for the editor's camera.

cameraOptions?: Partial<TLCameraOptions>

inferDarkMode

optional

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

inferDarkMode?: boolean

initialState

optional

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

initialState?: string

licenseKey

optional
licenseKey?: string

options

optional
options?: Partial<TldrawOptions>

shapeUtils

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

shapeUtils: readonly TLAnyShapeUtilConstructor[]

store

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

store: TLStore

tools

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

tools: readonly TLStateNodeConstructor[]

user

optional

A user defined externally to replace the default user.

user?: TLUser

Methods

getContainer

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


isShapeHidden

optional

A predicate that should return true if the given shape should be hidden.

Parameters

NameDescription

shape

The shape to check.

editor

The editor instance.

Returns

boolean

Prev
TLEditorComponents
Next
TLEditorRunOptions
hi

We use cookies on this website.
Learn more in our Cookie Policy.