Well, generally, I mostly use QTF to define RichText content.
Anyway, you can of course manipulate it directly (not quite documented at the moment...
Table manipulation routines are in RichText, starting with GetTableFormat method. All tables are accessed by table index, starting from zero. You can transform editation position to table index (to find out in what table cursor is) using RichPos structure, which contains a lot of related info...