Originally posted by **antn9x** April 5, 2023
I’d like to change my RichText’s content from "abc", to "def", but it’s not clear how. There’s no setString equivalent, and the closest is just calling initWithXML, but that comes with its own issues since the old renderer nodes are still present.
```
auto rich_text = cocos2d::ui::RichText::createWithXML("abc");
rich_text->setString("def"); //setString doesn't exist
rich_text->initWithXML("def"); //incorrectly renders both 'abc' and 'def' next to each other
```
Discussed in https://github.com/axmolengine/axmol/discussions/1166