0.1.1 • Published 3 years ago
fabric-textarea v0.1.1
fabric-textarea
FabricJS text area feature. Resize textbox without scaling textbox
Extracted from uibox design editor. See demo here
Installation
yarn add fabric-textarea
Example
import { fabric } from 'fabric';
import 'fabric-textarea';
const textbox = new fabric.Textarea({
text: 'Hello, how are you today',
fontSize: 18,
width: 240,
height: 120,
});
const canvas = new fabric.Canvas('canvas', {
height: 500,
width: 700,
backgroundColor: '#fff',
});
canvas.add(textbox);
textbox.center();
Navigate to example folder for a complete example.