富文本控件中的Image没有占位效果

将UIRichText demo中的代码移至cocos2d-h5 3.16版本中,图片与文字发生了覆盖

部分代码如下:

        let richText = new ccui.RichText();
        richText.ignoreContentAdaptWithSize(false);
        richText.width = 120;
        richText.height = 100;

        let re1 = new ccui.RichElementText(1, cc.color.WHITE, 255, "This color is white. ", "Helvetica", 10);
        let re2 = new ccui.RichElementText(2, cc.color.YELLOW, 255, "And this is yellow. ", "Helvetica", 10);
        let re3 = new ccui.RichElementText(3, cc.color.BLUE, 255, "This one is blue. ", "Helvetica", 10);
        let re4 = new ccui.RichElementText(4, cc.color.GREEN, 255, "And green. ", "Helvetica", 10);
        let re5 = new ccui.RichElementText(5, cc.color.RED, 255, "Last one is red ", "Helvetica", 10);
        var reimg = new ccui.RichElementImage(6, cc.color.WHITE, 255, "res/normal.png");

        richText.pushBackElement(re1);
        richText.insertElement(re2, 1);
        richText.pushBackElement(re3);
        richText.pushBackElement(re4);
        richText.pushBackElement(reimg);
        richText.pushBackElement(re5);

        this.addChild(richText);
        richText.x = 800;
        richText.y = 400;

问题已定位,需要确保Image引用的资源提前加载好,大家使用的时候也需要注意。