The core Editor
ships with a bunch of built-in commands that provide common behaviors for rich text editors.
These commands act on the document
based on the current selection
. They are equivalent to calling the Document Range Commands with the current selection as the range
argument, but they are there for convenience, since you often want to act with the current selection, as a user would.