HTML in tab text

2 posts, 0 answers
  1. Shawn
    Shawn avatar
    13 posts
    Member since:
    Mar 2015

    Posted 09 Jun 2015 Link to this post

    I'm unable to add html to the tab text. It outputs the html code.

                var tabHeader = value["AddressTypeDescription"];
                var tab = $('<div>').attr('name', tabHeader);
                var vm = kendo.observable(value);
                kendo.bind(tab, vm);

                //Need to do this otherwise the input values will not get passed
                tab.children().find('input').each(function () { $(this).attr('value', this.value);})
                //renders html code
                var closeButton = "<span unselectable='on' class='k-icon k-delete'>delete</span>";
                    text: tabHeader+' '+ closeButton,
                    content: tab.html()
                    , tabpanel.tabGroup.children(":nth-last-child(2)")


    This is the output:

    Company <span unselectable='on' class='k-icon k-delete'>delete</span>

  2. Petyo
    Petyo avatar
    2436 posts

    Posted 11 Jun 2015 Link to this post


    you need to enable the encoded configuration option, like our documentation suggests.

    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top