title: Get length of text in div using div
body: <p>I have div with fixed width of 30%.
  I want to get the length of text in that div.</p>
  
  <p>Here is my <a href="http://jsfiddle.net/4M8V7/" rel="nofollow noreferrer">fiddle</a></p>
  
  <p>What i am doing here is ,</p>
  
  <pre><code>var text=$('#test').text();
  text=text.trim();
  var len=text.length;
  alert(text);
  alert(len);
  </code></pre>
  
  <p>I am getting length of only text . How can i get length of text after applying html tags to it.</p>
  
  <p><strong>Current behaviour : Getting length as 105.<br>
  Expected behaviour : 29 * total line</strong> [ 29 is atmost characters can be in line of div ] </p>
  
  <p><strong><em>Update</em></strong></p>
  
  <p>I also want to to count the length including the area (green) shown in following image. <br>
  <img src="https://i.stack.imgur.com/qnWMu.png" alt="enter image description here"></p>