New to Kendo UI for jQuery? Download free 30-day trial

Insert HTML in the Window Title


Product Progress® Kendo UI® Window for jQuery


How can I insert HTML in the title of a Kendo UI Window?

Suggested Workaround

As of the 2017 R1 SP1 release and to prevent script injection, the Kendo UI Window no longer allows the adding of HTML through the title property of the widget. However, you can still work around the issue by programmatically inserting HTML in the title of the widget.

  1. Query the Window container for the .k-window-title class.

  2. Insert the desired HTML with jQuery.

  <div id="example">
    <div id="window">
      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas porttitor gravida odio vel gravida. Donec feugiat metus massa, molestie porttitor risus placerat a. Pellentesque iaculis vitae massa et condimentum. Suspendisse molestie maximus vulputate. Fusce vitae ex ut risus faucibus varius.</p>

    <span id="undo" class="k-button hide-on-narrow">Click here to open the window.</span>

    $(document).ready(function() {
      var myWindow = $("#window"),
          undo = $("#undo"),
          changeSettings = $("#change-settings");

        width: "500px",
        actions: ["Custom", "Minimize", "Maximize", "Close"],
        title: "About Josef Hoffmann",
        close: function() {
        visible: false
      }); () {
        var window ="kendoWindow");

        window.element.prev().find(".k-window-title").html("<b class='custom'>HTML title</b><i class='k-icon k-i-globe'></i>");;

In this article