@mocanvas/editor · interface
interface TldrawOptionsThe full option bag. Pass a Partial of it; everything unset falls back to defaultTldrawOptions.
On this page
Properties · 59
actionShortcutsLocation: TLActionShortcutsLocationWhere the quick actions render.
adjacentShapeMargin: numberGap left when placing an adjacent shape, duplicating, stacking or packing.
animationMediumMs: numberDuration of a medium-length camera animation: zoom to fit, zoom to selection.
branding?: string | undefinedThe application's name, used in accessibility labels ("Canvas for <branding>").
Accepted and used for labelling only. mocanvas paints no watermark and performs no licence check, so there is no vendor branding for this to turn on or off — the label is the whole of it.
camera: TLCameraOptionsThe camera's starting policy. Change it later with Editor.setCameraOptions.
cameraMovingTimeoutMs: numberHow long after the last camera write the camera counts as settled.
cameraSlideFriction: numberHow quickly a flung camera loses speed. 0…1; higher stops sooner.
coarseDragDistanceSquared: numberThe same threshold for a coarse pointer, where a still finger still wobbles.
coarseHandleRadius: numberHandle radius for a coarse pointer.
coarseHitTestMargin: numberHit-test tolerance for a coarse pointer.
coarsePointerWidth: numberAssumed pointer width used to widen the edge-scroll zone for touch.
collaboratorCheckIntervalMs: numberHow often collaborator liveness is re-checked.
collaboratorIdleTimeoutMs: numberAfter this long, a collaborator reads as idle.
collaboratorInactiveTimeoutMs: numberAfter this long without a presence refresh, a collaborator stops being drawn.
createTextOnCanvasDoubleClick: booleanWhether double-clicking empty canvas creates a text shape.
debouncedZoom: booleanServe a cached zoom level while the camera is moving, on a busy page.
debouncedZoomThreshold: numberShape count above which debouncedZoom takes effect.
deepLinks?: TLDeepLinkOptions | true | undefinedMirror the camera into the URL. true for the defaults, or an options object.
defaultSvgPadding: numberPadding around exported SVG content, in page units.
doubleClickDurationMs: numberLongest gap between two clicks that still counts as a double click.
dragDistanceSquared: numberHow far a pointer must move before it is a drag, squared.
Squared throughout so drag detection never takes a square root: it runs on every pointer move, and the comparison is exactly as correct either way.
edgeScrollDelay: numberHow long the pointer must sit at an edge before scrolling starts.
edgeScrollDistance: numberWidth of the band at the viewport edge that triggers scrolling.
edgeScrollEaseDuration: numberHow long scrolling takes to reach full speed.
edgeScrollSpeed: numberScreen pixels per frame at full speed, before the user's speed preference.
enableToolbarKeyboardShortcuts: booleanWhether the number keys select toolbar items.
experimental__onDropOnCanvas?(info: {Called when something is dropped on the canvas, before the editor's own
handling. Return true to claim the drop.
Named experimental__ because its signature is expected to change; it is
here because there is no other way to intercept a drop before assets are
created for it.
exportProvider: ComponentType<{A React provider wrapped around exported content.
Export renders shapes outside the editor's own tree, so a custom shape that reads a context — a theme, an i18n provider — renders wrong (or throws) unless that context is re-established here.
flattenImageBoundsExpand: numberHow far image bounds are expanded when flattening a selection to one image.
flattenImageBoundsPadding: numberPadding added when flattening a selection to one image.
followChaseViewportSnap: numberHow close the viewport must get to a followed collaborator's before it snaps.
gridSteps: readonly TLGridStep[]The grid's bands, coarsest first. See TLGridStep.
handleRadius: numberRadius of a selection handle's hit area, in screen pixels.
hitTestMargin: numberExtra tolerance around a shape when hit testing, in screen pixels.
laserDelayMs: numberHow long the laser trail stays fully visible.
laserFadeoutMs: numberHow long the laser trail takes to fade.
longPressDurationMs: numberHow long a press must last to become a long press.
maxExportDelayMs: numberHow long an export waits for fonts and images before giving up.
maxFilesAtOnce: numberMost files accepted from a single drop or paste.
maxFontsToLoadBeforeRender: numberHow many fonts to wait for before the canvas is shown at all.
maxPages: numberMost pages a document may hold. Set to 1 to make the document single-page.
maxShapesPerPage: numberMost shapes one page may hold. Creating past it is refused and reported.
multiClickDurationMs: numberWindow in which a further click extends a multi-click.
nonce?: string | undefinedCSP nonce stamped on any style tag the editor injects.
onBeforeCopyToClipboard?(info: {Called before a selection is written to the clipboard by copy or cut.
Return modified content to transform it, false to cancel the write, or
nothing to pass it through untouched.
onBeforePasteFromClipboard?(info: {Called after a paste has been parsed but before any shape is created. Only fires for a paste — a file drop does not go through the clipboard.
onClipboardPasteRaw?(info: TLClipboardPasteRawInfo): false | voidCalled first for a keyboard or menu paste, before the editor tries to
parse the clipboard at all. Return false to take the paste over
completely.
quickZoomPreservesScreenBounds: booleanWhether the quick-zoom brush keeps the viewport's scale.
rightClickPanning: booleanWhether dragging with the right button pans.
selectLockedShapes: booleanWhether a locked shape can be clicked or brushed into a selection.
snapThreshold: numberDistance, in screen pixels, at which snapping takes hold.
spacebarPanning: booleanWhether holding space turns the pointer into a pan.
temporaryAssetPreviewLifetimeMs: numberHow long a temporary asset preview stays paintable before it expires.
text?: TLTextOptions | undefinedRich-text configuration. Also accepted as the top-level textOptions.
textShadowLod: numberZoom below which text shadows stop being drawn.
tooltipDelayMs: numberHow long a tooltip waits before appearing.
uiCoarseDragDistanceSquared: numberUI drag threshold for a coarse pointer.
uiDragDistanceSquared: numberDrag threshold for UI elements rather than canvas content.
zoomToFitPadding: numberPadding left around the content by zoomToFit and friends.
Mentioned here
mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.