reactjs / react-art

React Bridge to the ART Drawing Library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is it possible to create a fixed width text-area?

create-renegr opened this issue · comments

Hi,

I'd like to place a text inside a rectangle, and I would love to see some auto-wrapping of the text inside this shape. If it is possible, could you please give some advice how I can achieve this?!

Thanks in advance!

Unfortunately, no, that requires a layout system and text measurement. This is not support by ART atm. It's a pure vector graphics system. You can overlay some CSS/HTML text but not from within the ART tree.

The idea is that you would have a layout system built on top of this. If you have text flow, then you're probably better off using HTML and then fitting the non-flowing pieces in various ART surfaces. At least until layout is built-in to React.

👍 thanks for your support & answer.