Editor › getSelectionHeadingLevel
Unofficial
Get the heading level shared by every selected line.
Signature:
getSelectionHeadingLevel(): number
Returns: number — The heading level (1-6), or 0 when a selected line is not a heading or the levels differ.