PasteRTF() is for pasting text which is formatted as RTF. If you want to paste plain text, you have to use the Paste() function. Before the Paste() function would work, you have to put the text on the clipboard. Another easier way, would be to use the ReplaceText (string ) function.
Also your comment is incorrect: // Replace the old text with text for the current row
SelectTextAll() selects all text of all "rows", not just the "current row". ("line" is a more appropiate term when speaking of a RT control).
If you have "all text selected" and after that are going to do a Paste() or ReplaceText(....), then there's no need to call the Clear() function first.
2019 R2 might have some bugs with certain Richtext functions. Maybe upgrading will improve things, though you'll probably find new bugs, so not sure if that's really good advice if you have a lot of existing code.
Try this:
String ls_PlainText = "plain text"
// Prevent flicker (try first without changing the setredraw. If it works, then uncomment this next line).
//rte_texto_xml.SetRedraw(FALSE)
// make sure the control is enabled:
rte_texto_xml.enabled = true
rte_text_xml.displayOnly = false
// Replace the old text with text for the current row
rte_texto_xml.SelectTextAll()
rte_texto_xml.ReplaceText(ls_PlainText)
rte_texto_xml.SetRedraw(TRUE)
regards.
Also, make sure that your rte is enabled and that it's not set to "display only" (though that last one only became a bug in 2019 R3).