Does RichText support linebreak by word wrapping?

I am using cocos2d-x 3.8.1 cpp version. I know Label supports linebreak by word wrapping, but I don’t know how to do it with RichText. By default, RichText does linebreak by character wrapping. Is there anyway to do it?

Update 2: I found this. It is not about to RichText but it worked for me: Ui::Text widget does not wrapp lines? - solved

Update 1: found it for character wrapping ignoreContentAdaptWithSize() has to be “false”.
However dont know how to do it (if possible) for Word wrapping. Anyone know if this is possible?

My current code.

auto myTextContainer = cocos2d::ui::RichText::create();
myTextContainer->ignoreContentAdaptWithSize(false);
myTextContainer->setContentSize(Size(100,100));
myTextContainer->setPosition(Vec2(320,500));
myTextContainer->pushBackElement(ui::RichElementText::create(0, Color3B::WHITE, 0xFF, "Eun lugar de la Mancha, de cuyo nombre no quiero acordarme, no ha mucho tiempo que vivía un hidalgo de los de lanza en astillero, adarga antigua, rocín flaco y galgo corredor. ", "arial.ttf", 20));

this->addChild(myTextContainer);

Any feedback would be very much appreciated.

Hi @ingtellect
If I understand well: your problem is that line is truncated on “random” letters and not by words?
Maybe a screenshot can help.

richText->setWrapMode(ui::RichText::WRAP_PER_WORD); should help.
I think by default WRAP_PER_CHAR must be happening.