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 102 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
colin
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? 

https://jsfiddle.net/Orbifold/mfcar358/

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')
            .kendoDiagram({
                shapes: [{
                    width: 150,
                    height: 100,
                    content:{
                        text:"I want to split this\r\n into two rows",
                        align: "center middle"
                    }
                }]
            })
            .getKendoDiagram();

1 Answer, 1 is accepted

Sort by
0
Tsvetina
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

Regards,
Tsvetina
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.
Tags
Diagram
Asked by
colin
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Share this question
or