This is a migrated thread and some comments may be shown as answers.

Line break in drawing API text

1 Answer 566 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jacky
Top achievements
Rank 1
Jacky asked on 06 Jan 2018, 05:09 PM
Is it possible to create line breaks with the Drawing API using the Text class?  

1 Answer, 1 is accepted

Sort by
0
Dimiter Topalov
Telerik team
answered on 08 Jan 2018, 01:16 PM
Hi Jacky,

Unfortunately, using line breaks and other control characters in the content property of the Text  shape is not supported, but you can use some custom logic to split the text in parts, and an additional Layout element to place the separate parts in. The "line breaks" will be where the next part can no longer fit on the same line, and a new line will be started, e.g.:

https://plnkr.co/edit/I0GCAEIMFwr0RNgn0hpI?p=preview

I hope this helps.

Regards,
Dimiter Topalov
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
General Discussions
Asked by
Jacky
Top achievements
Rank 1
Answers by
Dimiter Topalov
Telerik team
Share this question
or