MCPcopy Create free account
hub / github.com/shoutem/ui / appendText

Method appendText

html/services/HtmlParser.js:106–113  ·  view source on GitHub ↗

* Add text element to active node. * @param text

(text)

Source from the content-addressed store, hash-verified

104 * @param text
105 */
106 appendText(text) {
107 const trimmedText = text.trim();
108 if (trimmedText.length === 0) {
109 // Whitespace around element tags is ignored
110 return;
111 }
112 this.addChild('text', undefined, [decodeHtmlEntities(text)]);
113 }
114
115 getParent() {
116 return this.activeNode.parent;

Callers

nothing calls this directly

Calls 2

addChildMethod · 0.95
decodeHtmlEntitiesFunction · 0.70

Tested by

no test coverage detected