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

HTML content inside a diagram/splitting text into multiple rows

1 Answer 109 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
colin asked on 13 Sep 2018, 01:14 PM

I found an example using an older code base of kendo that allows for HTML content inside of a diagram but seems to have been removed under current release (see link below).  Is there a way to add HTML content to a diagram?

Second question I have is how to do a newline character inside content to split text on two rows?  I tried \r\n, etc. but nothing works.


var diagram = $('#diagram')
                shapes: [{
                    width: 150,
                    height: 100,
                        text:"I want to split this\r\n into two rows",
                        align: "center middle"

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 17 Sep 2018, 08:21 AM
Hi Colin,

This example does not seem to work in the jsfiddle and didn't work when I tested it in a Dojo using the quoted Kendo UI version (2015.1.318).

In general, to render the visual equivalent of an HTML declaration inside the Diagram shapes, you can follow this example:
Render External Content in Shapes

To see how to split shapes text into multiple lines, you can check this example:
Wrap Text

Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question