$.fn.overflowTo_WithKeepingTagsAndStyles = function(destination, options) {
  if (!options) options = "...";
  return this.each(function(num) {
    var height = parseInt($(this).css("height"));
    var content = $(this).html();
    var extraText = '';
    var tempDiv = document.createElement("div");
    var strMustOpenTags = "";
    var singletonTags = ["area", "base", "br", "col", "command", "embed", "hr", "img", "input", "forms", "link", "meta", "param", "source", "track", "wbr"];
    while (this.scrollHeight > height) {
      extraText = content.match(/\s+\S*$/).join() + extraText;
      content = content.replace(/\s+\S*$/, "");
      $(tempDiv).html(content);
      var currentTags = tempDiv.getElementsByTagName("*");
      var strMustCloseTags = "";
      strMustOpenTags = "";
      for (var i = 0; i < currentTags.length; i++) {
        var tag = currentTags[i].tagName;
        if (!singletonTags.includes(tag.toLowerCase()) && occurrences(content, '<' + tag) > occurrences(content, '</' + tag)) {
          strMustCloseTags = "</" + tag + ">" + strMustCloseTags;
          strMustOpenTags = "<" + tag + ">" + strMustOpenTags;
        }
      }
      $(this).html(content + strMustCloseTags + options);
    }
    $(destination).html(strMustOpenTags + extraText);
  });
}
function occurrences(string, subString, allowOverlapping) {
  string += "";
  subString += "";
  string = string.toLowerCase();
  subString = subString.toLowerCase();
  if (subString.length <= 0) return (string.length + 1);
  var n = 0,
    pos = 0,
    step = allowOverlapping ? 1 : subString.length;
  while (true) {
    pos = string.indexOf(subString, pos);
    if (pos >= 0) {
      ++n;
      pos += step;
    } else break;
  }
  return n;
}
$(function() {
  $("#divBase").overflowTo_WithKeepingTagsAndStyles($("#divExtra"));
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div id="divBase" style="float:left;border:solid 1px black;height:100px;width:100px;overflow:hidden;">
  a a <i> a a <b>a a a very very <u>very</u> long <br/> <br/> long long long text text text text is is is is here <br/> here here </b>here here here</i> here here
</div>
<div id="divExtra" style="float:left;border:solid 1px black;height:100px;width:200px;">
</div>