title: knockout custom html binding
body: <p>I am trying to use knockout to create a html editor/previewer. I set up a simple test with a single observable as follows:</p>
  
  <p>JS: </p>
  
  <pre><code>var ViewModel = function() {
      this.content = ko.observable("&lt;div data-bind=\"text: 'testext'\"&gt;&lt;/div&gt;");
  };
  
  ko.bindingHandlers.bindHTML = {
      'init': function () {
      },
      'update': function (element, valueAccessor) {                         
          ko.utils.setHtml(element, valueAccessor());
      }
  }
  
  ko.applyBindings(new ViewModel());
  </code></pre>
  
  <p>HTML: 
      
      </p>
  
  <pre><code>&lt;input type="text" data-bind="value: content"&gt;
  </code></pre>
  
  <p>This seems to work fine when the page first loads, displaying a div with 'testext' in it, however as soon as I edit the input field to something like 
  <code>&lt;div data-bind=\"text: 'testext2'\"&gt;&lt;/div&gt;</code> the binding doesn't work! </p>
  
  <p>Is this a limitation of knockout, or is there something I'm doing wrong? Is there a way of preforming a rebind?</p>
  
  <p>A JSFiddle is available here: <a href="http://jsfiddle.net/Q9LAA/" rel="nofollow">http://jsfiddle.net/Q9LAA/</a></p>