富文本 (RichText )
<p>[TOC]</p>
<h3>创建富文本</h3>
<pre><code>co.RichText:create(parent,t)</code></pre>
<pre><code>t.id or &quot;rich_text&quot;
t.content or &quot;&quot;
t.width or 200
t.font or 18
t.color or &quot;#ffffff&quot;
t.callback or callback
t.fontName
t.margin or 5
t.lineSize or 1
t.x or 0
t.y or 0
t.ontline or {outlineSize = 1,outlineColor = {r = 255,g = 255,b = 255}}
t.closeOutline --关闭描边</code></pre>
<h3>创建新富文本</h3>
<pre><code>co.RichText:createTxt(parent,p)</code></pre>
<pre><code>parent, --父节点
p.id, --唯一ID
p.x or 0, --位置 横坐标
p.y or 0, --位置 纵坐标
p.content, --文本内容
p.width or 888, --富文本控件宽度
p.font or 18, --字体大小
p.color or &#039;#FFFFFF&#039;, --字体颜色
p.margin, --富文本行间距
p.callback, --超链回调函数
p.fontName, --字体文件路径
p.outlineParam or {outlineSize=2,outlineColor=SL:ConvertColorFromHexString(&#039;#000000&#039;)} --描边参数outlineSize: 描边大小outlineColor: 描边颜色 C3B (描边颜色 例 : SL:ConvertColorFromHexString(&quot;#FFFFFF&quot;))</code></pre>
<h3>设置富文本背景颜色</h3>
<pre><code>co.RichText:setBackGroundColor(widget,color)</code></pre>
<p>``` 格式化富文本
widget 富文本对象
color 颜色值(#000000)</p>
<pre><code>### 格式化富文本</code></pre>
<p>co.RichText:formatText(widget)</p>
<pre><code>### 格式化富文本中href内容</code></pre>
<p>co.RichText:formatHref(content)</p>
<pre><code></code></pre>
<p>richText 富文本内容</p>
<pre><code></code></pre>