Skip to content

Text Highlight 文字高亮

文字高亮组件,用于高亮文字。

default

基础用法

使用 search 属性来指定需要高亮的文字。使用 search-color 属性来指定高亮的颜色。

search 属性为正则表达式字符串。

textthis is the highlight custom element
html
<xtt-text-hl search="ex">text</xtt-text-hl>
<xtt-text-hl search="i|l|h" search-color="red">this is the highlight custom element</xtt-text-hl>