TLEditorOptions
Table of contents
Public interface
interface TLEditorOptions {}
packages/editor/src/lib/editor/Editor.ts
Properties
autoFocus
Public propertysignature
Whether to automatically focus the editor when it mounts.
autoFocus?: boolean
cameraOptions
Public propertysignature
Options for the editor's camera.
cameraOptions?: Partial<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.
getContainer: () => HTMLElement
inferDarkMode
Public propertysignature
Whether to infer dark mode from the user's system preferences. Defaults to false.
inferDarkMode?: boolean
initialState
Public propertysignature
The editor's initial active tool (or other state node id).
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.
shapeUtils: readonly TLShapeUtilConstructor<TLUnknownShape>[]
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.
store: 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.
tools: readonly TLStateNodeConstructor[]
user
Public propertysignature
A user defined externally to replace the default user.
user?: TLUser