HTML with classes in text area

2 posts, 0 answers
  1. Brandon
    Brandon avatar
    3 posts
    Member since:
    Feb 2013

    Posted 23 Apr 2013 Link to this post

    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. 


    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. 

  2. Dimiter Madjarov
    Dimiter Madjarov avatar
    2213 posts

    Posted 24 Apr 2013 Link to this post

    Hi Brandon,

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

    I hope this information was helpful for you.


    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!
Back to Top