将换行符添加到tooltipster插件生成的工具提示中

Mr.*_*yyy 6 jquery tooltipster

我最近尝试使用工具提示的新插件,因为我喜欢这个功能.但是我遇到了一个问题,我不知道如何添加新行,所以我的工具提示不会只是遍及整个页面.我尝试了一些我在这里读到的解决方案,比如转义字符,但它们不起作用.

$(document).ready(function () {		
	$('.tooltip-custom').tooltipster({
		theme: 'tooltipster-noir'
	});
});
Run Code Online (Sandbox Code Playgroud)
<link href="https://cdnjs.cloudflare.com/ajax/libs/tooltipster/3.0.5/css/tooltipster.css" rel="stylesheet"/>
<link href="https://cdnjs.cloudflare.com/ajax/libs/tooltipster/3.0.5/css/themes/tooltipster-noir.css" rel="stylesheet"/>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tooltipster/3.0.5/js/jquery.tooltipster.js"></script>

<a href="#" class="tooltip-custom" title="This is my very long run on tooltip that just doesnt seem to want to end or split lines. Ok maybe I am overreacting but still. I want to be able to start a new line whenever I please!"><h1>Hello!</h1></a>
Run Code Online (Sandbox Code Playgroud)

小智 16

contentAsHTML:True,如果工具提示的内容以字符串形式提供,则默认情况下显示为纯文本.如果此内容实际上应解释为HTML,请将此选项设置为true.

Insert <br> or use <div> in your title.

 $(document).ready(function () {        
$('.tooltip-custom').tooltipster({
      contentAsHTML: true,
});
});
Run Code Online (Sandbox Code Playgroud)