Reputation: 419
There is a HTML which saved in a textareafield;
"<pre class="brush: sql"><span style="color:#999;">SELECT </span>ATM.TBL_SKR_LISTENER.MSG_ID,ATM.TBL_SKR_LISTENER.MSG
<span style="color:#999;">FROM </span>ATM.TBL_SKR_LISTENER</pre>"
I want to get this;
SELECT ATM.TBL_SKR_LISTENER.MSG_ID,ATM.TBL_SKR_LISTENER.MSG FROM ATM.TBL_SKR_LISTENER
How can I get rendered value of this HTML code with using ExtJS ?
Thanks
Upvotes: 1
Views: 1112
Reputation: 80
it's rather simple, just create div and set innerHTML of this div to textarea value, then get textContent or innerText of the div. See this fiddle for more details: https://fiddle.sencha.com/#fiddle/c1f
Upvotes: 1