How can I get the style such as Input, Text, Code, etc., of a selected cell? If a group of cells is selected, how can I get styles of all the cells in the group?
"Style" /. Developer`CellInformation[nb]
nb is the
NotebookObject for the notebook you care about. Since you could have multiple cells selected, this will always return a list. It's also possible to have no cells selected, in which case
CellInformation will return
$Failed and the above code would throw an error.