The sort command can be used to sort elements in the current document.
sort [ all | selection | elementRange startElement [ endElement ] ] [ descending ] [ numeric ] [ localeSensitive ] [ columnRange startColumn [ endColumn ] ] [ newField [ descending ] [ numeric ] [ localeSensitive ] [ columnRange startColumn [ endColumn ] ] ] [...]
all | Use the parameter all to indicate that you want to sort all of the visible elements. |
selection | Use the parameter selection to indicate that you want to sort only those elements included in the block selection. |
elementRange startElement [ endElement ] |
Use the parameter elementRange to indicate the range of elements that you wish to sort. The startElement and endElement parameters must be positive integers indicating the element's ordinal position in the document. If you do not specify endElement, the element range will extend from startElement to the end of the document. |
descending | Use the parameter descending to indicate that the elements should be sorted in descending order. |
numeric | Use the parameter numeric to indicate that the element text should be interpreted as numbers rather than as text. |
localeSensitive | Use the parameter localeSensitive to indicate the element text should be sorted based on locale-sensitive comparisons. |
columnRange startColumn [ endColumn ] |
Use the parameter columnRange to indicate the column range of text that should be used in sort comparisons. The startColumn and endColumn parameters must be positive integers indicating the column positions. If you do not specify endColumn, the column range will extend to the end of the element. |
newField | Use the parameter newField to indicate that an additional field should be used to further sort the document. |
The status parameter is not affected by this command.
If there is a block selection and you do not specify all or elementRange, the sort command will sort the elements that are included in the current block selection.
If there is no block selection and you do not specify elementRange, the all of the visible elements in the document will be included in the sort.
If there is a rectangular block selection and you do not specify all, elementRange, or columnRange, the sort will be based on the text that is included in the rectangular block selection.
The sort command will only affect visible elements that are not show elements.
sort sort selection sort elementRange 10 20 columnRange 1 4 newField columnRange 10 20 numeric descending
show parameter
visible parameter
Default editor commands