How can we determine the different operation targets of sel[j] based on the cursor state?
I am not very clear about the current selection object and its hierarchical relationships, especially the representation of the parent level. Could someone clarify these relationships?
For example:
Situation 1: When the cursor is outside the table
A. When the cursor is in a paragraph with no selection, sel[j] is the entire paragraph.
B. If part of the text is selected, sel[j] is the selected text. (This includes selecting all text within the text box.)
C. If the text box is selected, sel[j] is all content within the text box (including images, text, and tables).
Situation 2: When the cursor is inside a table
D. If the cursor is within a cell, sel[j] is the current cell.
E. If multiple cells are selected via drag, sel[j] is the selected cells.
F. If the entire table is selected, sel[j] is the entire table.
Thank you very much.



