title: finding height and width of content after editing with nicedit
body: <p>I have a div that is resizable and draggable via jquery.</p>
  
  <p>It is also editable with niceedit.</p>
  
  <p>The problem I have is when i add more text to the div whilst in editmode the div does not expand to fit the text in and the text spills out of the div.</p>
  
  <p>Does anyone have any idea how I can update the height and width of the div from the updated contents?</p>
  
  <p>You can see on this example if you start adding text the box does not expand:</p>
  
  <p><a href="http://jsfiddle.net/j6FLa/20/" rel="nofollow">http://jsfiddle.net/j6FLa/20/</a></p>
  
  <p>Code to match jsfiddle</p>
  
  <pre><code>.dragbox {
  position:absolute;
  width:10px;
  height:25px;
  padding: 0.0em;
  margin:25px;
  cursor:move;
  z-index:2
  }
  
  #draggable {
  min-width:150px;
  min-height:150px;
  height:auto;
  width:auto;
  border:1px solid #ff0000;
  padding:25px;
  }
  
  
  
  //&lt;![CDATA[
  bkLib.onDomLoaded(function () {
      var myNicEditor = new nicEditor();
      myNicEditor.setPanel('myNicPanel');
      myNicEditor.addInstance('draggable');
  });
  //]]&gt;
  
  
  $("div.dragbox").dblclick(function (e) {
      $('.dragbox').css('cursor', 'select');
      $(this).draggable('disable').removeClass('ui-state-disabled').focus();
      }).on('blur', function () {
      $(this).draggable('enable');
  });
  
  $(function () {
      $("#draggable").draggable().resizable();
  });
  
  
  &lt;div id="myNicPanel" style="width: 525px;"&gt;&lt;/div&gt;
  &lt;div id="draggable" class="dragbox" contenteditable="true" style=""&gt;Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed magna dolor&lt;/div&gt;
  </code></pre>