converting HTML format into text format
<p>I do have a table which contain some data in it and a form besides it.I am binding this form on click of any row of the table means the data related to the respective row gets filled to the form which are coming from the database,my concern is that out of this data from the database one of the field is "def_text" which is basically stored in the  HTML format but i want to show it in plain text format in the form where i am binding it.</p>

<pre><code>&lt;form class="form report live " data-table="contractlistTable" id="contractlistForm"  data-bind="foreach:items"  target="_blank" method="post"&gt;
            &lt;input type="hidden" name="pid" id="pid" /&gt;
            &lt;div class="control-group "&gt;
                &lt;label class="control-label"&gt;Title&lt;/label&gt;
                &lt;div class="controls"&gt;
                        &lt;input type="text" id="title" name="title" required title="required" placeholder="title" data-bind="value:title" /&gt;
                        &lt;input type="checkbox" id="active" name="active" class="check" data-bind="checked: active=='true'"  /&gt;Active
                &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class="control-group "&gt;
                &lt;label class="control-label"&gt;Default Text&lt;/label&gt;
                &lt;textarea id="def_text" name="def_text" class="htmleditor" rows="9" cols="50" style="width: 600px; height: 190px;" data-bind="value:def_text"&gt; &lt;/textarea&gt;
            &lt;/div&gt;
&lt;/form&gt;
</code></pre>

<p>this is the form and the code for the table is </p>

<pre><code>&lt;table class="table table-hover table-bordered" id="contractlistTable" style="width: 304px;"&gt;
            &lt;thead&gt;
                &lt;tr&gt;
                    &lt;th&gt;Title&lt;/th&gt;
                    &lt;th&gt;Active&lt;/th&gt;
                &lt;/tr&gt;
            &lt;/thead&gt;
            &lt;tbody data-bind="foreach:items" class="bindable" data-model="companycontract"&gt;
                 &lt;tr data-bind="attr:{'data-value': id,'data-index':$index}"&gt;
                    &lt;td data-bind="text:title"&gt;&lt;/td&gt;
                    &lt;td&gt;
                        &lt;!-- ko if:active === 'true' --&gt;
                        &lt;span class="badge badge-success"&gt;&lt;/span&gt;
                        &lt;!-- /ko --&gt;
                        &lt;!-- ko if: active === 'false' --&gt;
                        &lt;span class="badge"&gt;&lt;/span&gt;
                        &lt;!-- /ko --&gt;
                    &lt;/td&gt;
                &lt;/tr&gt;
            &lt;/tbody&gt;
        &lt;/table&gt;
</code></pre>

<p>and for binding it i am using Knockout.js</p>

<pre><code>$(function () {
        var myForm = "";
        var formFields;
        $("#contractlistTable tbody tr").live('click', function () {
            var data = [model.companycontract[$(this).attr("data-index")]];
            if (!!formFields) formFields.refill(data);
            else {
                formFields = new DynamicModel(data);
                ko.applyBindings(formFields, document.getElementById("contractlistForm"));
            };

            var id = [$(this).attr("data-value")];

            var kunnr = $('#kunnr').val();
            $('.report').attr("action", 'http://wcidevapps.com/salescentral/pcontract.php?ct=i&amp;knr=' + kunnr + '&amp;cid=' + id);

        });
 });
</code></pre>

<p>so please help me on this..</p>
