Preventing overflow by automatic resizing (in JS)

Problem:

Hi, I have a page that shows a conversation of two characters. The text is provided through speech bubbles. I would like the bubble size to be responsive to the amount of text. I tried the length attribute and then tried to find a formula the makes the height and width of the bubble dependent on the number of characters. However, it is difficult to find the best formula.

Now I am thinking the following: as soon as the text is inserted in the speech bubble, the code checks for overflow and if yes, enlarges the bubble to 120%, checks again and either makes it larger again or keeps the present size. How can I do this in JS?

Thanks, Rolf

ActivePresenter version:

OS:

Notes:

Hi Rolf,

Thank you for your question.

Currently, there isn’t a way to automatically resize a speech bubble based on text overflow. What you’re trying to do with JavaScript isn’t supported at this time.

We appreciate the suggestion and will consider it for future improvements.

Best regards,

1 Like