My initial approach for this is to duplicate the ElementDescr of the TextNode, and then call mdlModify_elementDescr2() to "replace" the text element components with the desired text string(s). Then using the "new" ElementDescr, simply replace it via ReplaceElemDescr().
Not sure if this is the best/correct approach, but it *seems* to be working. More testing required.
Bruce