Interactive text fields with Fabric.js

前端 未结 6 675
梦如初夏
梦如初夏 2021-01-30 17:49

I\'ve been playing with Fabric.js a lot in the last few weeks, but regarding text fields I\'ve only found it possible to set the text on creation.

Is there any possible

6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-30 18:11

    The latest version of fabric.js includes a class IText which incorporates the interaction for editing and selection of text dynamically. try the code below with the latest version of fabric.js

    canvas.add(new fabric.IText('Tap and Type', { 
      fontFamily: 'arial black',
      left: 100, 
      top: 100 ,
    }));
    

提交回复
热议问题