Replies: 3 comments
-
At the moment, you'll need to both delete it from the tools array, but also manually remove it from any menus etc. in the UI that include it. This is a little involved at the moment - for e.g. the toolbar, you'd need to copy this component into your app and remove the entries you don't want: https://github.com/tldraw/tldraw/blob/main/packages/tldraw/src/lib/ui/components/Toolbar/DefaultToolbarContent.tsx#L6-L39 Then override the toolbar to use the new content: <Tldraw
components={{
Toolbar: (props) => <DefaultToolbar {...props}><MyToolbarContent /></DefaultToolbar>
}}
/> Check out the "UI & theming" section of the examples to see a bit more on how to do this: https://tldraw.dev/examples/ui/custom-actions-menu (this is a semi-common pain point, i'd like to get it fixed soonish!) |
Beta Was this translation helpful? Give feedback.
-
Just realised some of the changes for this aren't released yet, sorry! You'll need to upgrade to a canary ( |
Beta Was this translation helpful? Give feedback.
-
Thank you for them plentiful hints, it worked using |
Beta Was this translation helpful? Give feedback.
-
I seem to be unable to find a corresponding example, but also after digging through the source code I can't seem to find a simple way of disabling one specific tool.
For example, I'd like to disable
The first thing I tried was this:
However, that leaves me with:
Beta Was this translation helpful? Give feedback.
All reactions