TextSplitter 属性

splitText() 函数返回的 TextSplitter 实例可用的属性。

const split = splitText(target, parameters);
      ┌──────┐
split.│lines │
split.│words ├─ Properties
split.│chars │
      └──────┘
名称 描述
$target 获取拆分的根元素(HTMLElement
html 获取html进行拆分 (String)
debug 获取调试样式是否可见 (Boolean)
includeSpaces 获取是否应在文本中换行空格 (Boolean)
accessible 获取是否应创建可访问的克隆元素 (Boolean)
lines 获取行元素(Array<HTMLElement>
words 获取行元素(Array<HTMLElement>
chars 获取行元素(Array<HTMLElement>
lineTemplate 该行 html 模板 (String)
wordTemplate 单词 html 模板 (String)
charTemplate 字符 html 模板 (字符串)