code: function fitPreviewToContent() {
    var iframeDoc = preview.contentDocument || preview.contentWindow.document;
    setPreviewHeight(iframeDoc.body.offsetHeight);
  }
docs: Adjusts the iframe height based on the iframe's document height. The width is unchanged.