Text overflow

Important: these settings may change in the future.

By default, text objects in Polotno will increase their height when you type more text, change text via API, or set bigger font size.

You can change this behavior:

import { unstable_setTextOverflow } from 'polotno/config';

// default, change height of the text object when it overflow defined with/height
unstable_setTextOverflow('resize');

// add ... at the end of the text when it overflow defined with/height
unstable_setTextOverflow('ellipsis');

// reduce font size to fit text in the defined width/height
// note, it will not increase font size back when there is more space
unstable_setTextOverflow('change-font-size');

You can use this settings in combination with unstable_setTextVerticalResizeEnabled

You can set this property once, globally, or you can change in realtime based on current elements selection.

News, updates and promos – be the first to get 'em

News, updates and promos – be the first to get 'em