Skip to main content

Text overflow

Warning: this settings is unstable and 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

// add ... at the end of the text when it overflow defined with/height

// reduce font size to fit text in the defined width/height
// note, it will not increase font size back when there is more space

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.

Open Demo