@mocanvas/mocanvas · constant

defaultOverlayUtils

declare const defaultOverlayUtils: readonly TLAnyOverlayUtilConstructor[]

Pass to Editor/<Mocanvas> as overlayUtils, or spread it to add one:

``ts <Mocanvas overlayUtils={[...defaultOverlayUtils, MyOverlayUtil]} /> ``

To *replace* one of the defaults, register a util with the same type — OverlayManager.registerUtil treats a repeated type as an override rather than a duplicate, so a subclass slots in without filtering the array.

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.