I would like implement to my app(React), in object TextBox from fabric.js value which check text in Testbox. When text is link i would like set splitByGrapheme to true and in the other situation set to false.
const isLink = options.text !== undefined && options.text.includes('http');
switch (options.type) {
case CanvasType.TEXTBOX:
return new TextBox(options.text ?? '', {
...options,
lockUniScaling: true,
objectCaching: false,
splitByGrapheme: isLink,
});
This is my code but It only work after refresh Thank you in advance for answer.