Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As per jsfiddle in comment Here is <a href="http://jsfiddle.net/nNuKk/4/" rel="nofollow">Another working example</a> the key here is to <code>escape</code> even the ampersand <code>&amp;</code> in <code>&amp;lt;</code> or <code>&amp;gt;</code>. </p> <p>just make the text in text area look like below</p> <pre><code> &lt;b&gt;Hey, look.. this is how do you make your text bold:&lt;/b&gt; &amp;amp;lt;b&amp;amp;gt;{text}&amp;amp;lt;/b&amp;amp;gt; </code></pre> <p>If this what you are looking for accept the answer:) or let me know your comments/concerns. </p> <hr> <p><a href="http://jsfiddle.net/SPU6E/2/" rel="nofollow">working example</a> Suppose</p> <pre><code> &lt;body&gt; &lt;textarea id="myid"&gt;&lt;b&gt;Hey, look.. this is how do yo make your text bold:&lt;/b&gt;&amp;gt;b&amp;lt&amp;;{text}&amp;gt;/b&amp;lt;&lt;/textarea&gt; &lt;div id=2&gt; &lt;/div&gt; &lt;/body&gt; </code></pre> <p>and then javascript</p> <pre><code> $("#2").text($("#myid").val()); </code></pre> <p>SO in your case you should use </p> <pre><code>this.$editor.text($textarea.val()); </code></pre> <p>instead of </p> <pre><code>this.$editor.html($textarea.val()); </code></pre> <p>If this does not work let me know what element type is your <code>$editor</code> <code>textarea</code> or<code>span</code> or anything else</p> <p>If above does not work try this</p> <pre><code> var temp=$("&lt;div&gt;&lt;/div&gt;").text($textarea.val()).html(); //temp will contain the escaped representation this.$editor.html(temp); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload