JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://jeasyui.com/easyui/jquery.easyui.min.js"></script>
<link rel="stylesheet" href="http://jeasyui.com/easyui/themes/default/easyui.css">
<link rel="stylesheet" href="http://jeasyui.com/easyui/themes/icon.css">
<div>
<input class="easyui-textbox valuetip" value="First Line
Second Line
Third Line
Fourth Line
">
<div style="margin-top:20px">
<input class="easyui-textbox valuetip" value="Hello World">
<div style="margin-top:20px">
<input class="easyui-textbox valuetip">
JavaScript
$('input.valuetip').css('text-overflow','ellipsis').each(function(){
$(this).textbox({icons:[{iconCls:'icon-ok'}]}).textbox('getIcon',0).tooltip({
onShow:function(e){
var val = $($(this)[0]).closest('.textbox').prev('input').textbox('getValue').replace(/(\r\n|\n|\r)/g,"<br />");
if(!val) $(this).tooltip('hide');
else $(this).tooltip('update','<span class="vtip">'+val+'</span>');
}
});
})