-
I have a textbox with determined width and height,want to limit the input text to not exceed the set width, so I will give an error prompt and give up the content entered this time. I have tried whether I can monitor text changes, or size changes, and handle them in events, but I haven't found a suitable event. https://codesandbox.io/s/still-haze-zys42f?file=/src/App.tsx |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
This is the method that changes the textbox width fabric.js/src/shapes/textbox.class.js Line 322 in cf59e45 Here you can override and check what you need and even return a different value: fabric.js/src/shapes/textbox.class.js Line 292 in cf59e45 |
Beta Was this translation helpful? Give feedback.
This is the method that changes the textbox width
fabric.js/src/shapes/textbox.class.js
Line 322 in cf59e45
Here you can override and check what you need and even return a different value:
fabric.js/src/shapes/textbox.class.js
Line 292 in cf59e45