add(text, styles, index) {
        if (index === undefined || index === null) {
            this._node.push(new RichTextFragment(text, styles, this));
        } else {
            this._node.splice(index, 0, new RichTextFragment(text, styles, this));
        }
        this.removeUnsupportedNodes();
        return this;
    }
Adds a rich text fragment to the last or after the given index. This instance will be mutated.
@param {string} text - the text
@param {{}} [styles] - the styles js object, i.e. {fontSize: 12}
@param {number|undefined|null} [index] - the index of the fragment to add
@return {RichText} the rich text instance