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

HTML with classes in text area

1 Answer 107 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Brandon
Top achievements
Rank 1
Brandon asked on 23 Apr 2013, 07:56 PM
I'm wondering if I can use more than just html elements in the text area that is created by the dataTextField. I'd like to add html classes but I'm having trouble getting it to work. 

Example:

dataTextField: "text",
 dataImageUrlField: "imageUrl",
 dataContentField: "content",
dataSource: [
     {
      text: "Bid Details",
      imageUrl: "img/bid_details_icon.png",
      content: "<table class="hello_world"><tr><td>Hello World</td></tr></table>"
      },

The set of quotes for the class name breaks the string. 

Thanks
-Brandon

1 Answer, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 24 Apr 2013, 11:12 AM
Hi Brandon,


Yes you could add a CSS class to the content. You should either use a single quotes or escape the double quotes.
E.g.
content: "<table class=\"hello_world\"><tr><td>Hello World</td></tr></table>"

I hope this information was helpful for you.

 

Greetings,
Dimiter Madjarov
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
TabStrip
Asked by
Brandon
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Share this question
or