I'm currently facing an issue with my code snippet that is supposed to create a new Textbox
:
new fabric.Textbox('Add some text')
The problem I'm encountering is that the text box appears too small compared to its content:
https://i.sstatic.net/koqcs.png
If I try setting a fixed width, then I end up with unwanted padding around the text:
new fabric.Textbox('Add some text', {width: 350})
https://i.sstatic.net/NYzX1.png
Is there a way for me to adjust the size of the text box to match the text selection size? I've tried looking for information on how to obtain the selection dimensions but haven't found anything useful so far.
The version of fabric I'm using is 4.0.0-beta.5
.