getElementText()function
getElementText(elements: Elements): string
| Param | Type | |
|---|---|---|
elements | Elements | An element, a plain string, or null/undefined (or an array of those things). required |
| Return | |
|---|---|
string | The combined string made from the elements. |
Strip all tags from elements to produce a plain text string.
- A
<br>element becomes a newline (\n) — matching DOMinnerText, so words either side of a line break don't fuse together.
Examples
`- Item with *strong*\n- Item with _em_` becomes `Item with strong Item with em`