Note that there are some explanatory texts on larger screens.

plurals
  1. POcount characters of textarea in aloha editor
    primarykey
    data
    text
    <p>my html code is like this:</p> <pre><code>&lt;div class="control-group"&gt; &lt;label class="control-label"&gt;Message Body &lt;p class="showlimit"&gt;&lt;!-- this shows character limit for the message --&gt; &lt;span id="charsLeft"&gt;&lt;/span&gt;/&lt;span id="charsLimit"&gt;&lt;/span&gt; &lt;/p&gt; &lt;/label&gt; &lt;div class="controls"&gt; &lt;textarea rows="7" id="msg" name="msg" class="field span5"&gt;&lt;/textarea&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>and my jquery code is like this:</p> <pre><code>$('#charsLimit').text(1200); $('#msg').limit($('#charsLimit').text(),'#charsLeft'); </code></pre> <p>I wanted to show number of character left in id charsLeft out of 1200 (i.e. value of charsLimit) In normal basis it work, but on rich editing level using <b>Aloha editor</b> it is not working as it replaces textarea with <i>div</i> like this:</p> <pre><code>&lt;!-- rest of the above code is same --&gt; &lt;div class="controls"&gt; &lt;textarea id="msg" class="field span5" name="msg" rows="7" style="display: none;"&gt;&lt;!-- observe the style displaying none --&gt; &lt;/textarea&gt; &lt;!-- msg replaced with msg-aloha hence not able to perform normal jquery on msg --&gt; &lt;div id="msg-aloha" class="aloha-textarea aloha-editable aloha-block-blocklevel-sortable ui-sortable" contenteditable="true" style="height: 140px; width: 456px;"&gt; &lt;br class="aloha-cleanme" style=""&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>I am not able to understand what to do...</p>
    singulars
    1. This table or related slice is empty.
    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. 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