[Vuejs]-Convert form text in image – canvas

0👍

Canvas can be used to create images programmatically.

This can be easily achieved using react-canvas library.

const ReactCanvas = require('react-canvas');
const Surface = ReactCanvas.Surface;
const Image = ReactCanvas.Image;
const Text = ReactCanvas.Text;
class MyComponent extends Component{
     render(){
       const surfaceWidth = window.innerWidth;
       const surfaceHeight = window.innerHeight;
       return(
          <Surface width={surfaceWidth} height={surfaceHeight} left={0} top{0}>
            <Text>
             Text Data from Your form component
            </Text>
          </Surface>
       )
     }
    }

Leave a comment