Can I modify the double-click event in the select tool? #3588
-
The select tool generates text on double-click and I want to stop it (without readonly mode) |
Beta Was this translation helpful? Give feedback.
Answered by
Taha-Hassan-Git
Apr 25, 2024
Replies: 1 comment
-
Putting this in your onMount callback should do it. Though typescript will yell at you because it doesn't know this method exists. onMount={(editor) => {
editor.setCurrentTool('select')
const selectTool = editor.getCurrentTool()
// @ts-ignore
selectTool.children.idle.handleDoubleClickOnCanvas = () => {
// do your cool stuff here
return undefined
}
}} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Taha-Hassan-Git
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Putting this in your onMount callback should do it. Though typescript will yell at you because it doesn't know this method exists.