title: Get contentEditable div height after typing a new char
body: <p>I currently have a contentEditable div with a fixed width and a flexible height,that must be increased or decreased according to the length of the user input.</p>
  
  <p>The problem is that thought the following code,i'm getting the height of the contentEditable based on the last char typed,this is my code:</p>
  
  <pre><code>&lt;!-- THE JS FUNCTION THE GETS THE DIV CALLED title HEIGHT--&gt;
  function setInTitle() {
  
          var titleHeight = document.getElementById('title').offsetHeight;
  
  }
  
  &lt;!-- THE DIV CALLED title --&gt;
  &lt;div
       id="title"
       class="title"
       contenteditable="true"
       style="font-family: Helvetica; font-size:18px; font-weight:bold; background-color:#fff; color:#000; -webkit-tap-highlight-color:rgba(0,0,0,0); margin:14px;"
       autocapitalization="off"
       autocorrection="off"
       autocomplete="off"
       onKeyPress="setInTitle();" &lt;==CALL THE JS FUNCTION
  &gt;&lt;/div&gt;
  </code></pre>
  
  <p>So,i need through JAVASCRIPT,get the contentEditable height instantly after when a new char is typed,and if possible before the char become rendered,like the scheme bellow:</p>
  
  <p><strong>KEYBOARD KEY PRESSED     =></strong> </p>
  
  <p><strong>JS GET THE HEIGHT OF THE CONTENTEDITABLEDIV WITH THE NEW CHAR     =></strong></p>
  
  <p><strong>CHAR NOW BE RENDERED</strong>(This is just an simulation of course things won't get strictly like this)</p>
  
  <p>This can be done?Any ideas would be appreciated,thanks in advance!</p>