I'm currently struggling with a situation that I can't seem to figure out.
Within a container (outer
), I have three children. My goal is to resize the middle container (div) based on the height of the contenteditable area. All three containers should ideally "fit" within the outer-div.
<div id="outer"> //container
<div id="contenthead" contenteditable="true">head</div>
<div id="content"> I am content </div> <!-- I should shrink or grow depending on the content editable -->
<div id="contentend" contenteditable="true">end</div>
</div>
I've attempted to use a mutationobserver
, as well as jquery ui
, however, they only provide partially effective solutions. Sometimes events are not triggered or there's a slight loss in pixels.
Does anyone have a solution for this issue?
For further clarification, you can view an example on JSfiddle.