Note that the root of a range is an important property, which limits many
algorithms implemented in range's methods. Therefore it is crucial, especially
when using ranges inside inline editors, to specify correct root, so using
the CKEDITOR.editor.createRange method is highly recommended.

Selection

Range is only a logical representation of a piece of content in a DOM. It should not
be confused with a selection which represents "physically
marked" content. It is possible to create unlimited number of various ranges, when
only one real selection may exist at a time in a document. Ranges are used to read position
of selection in the DOM and to move selection to new positions.

Creates a "non intrusive" and "mutation sensible" bookmark. This
kind of bookmark should be used only when the DOM is supposed to
remain stable after its creation.

Parameters

normalized : Boolean (optional)

Indicates that the bookmark must
be normalized. When normalized, the successive text nodes are
considered a single node. To successfully load a normalized
bookmark, the DOM tree must also be normalized before calling
moveToBookmark.

Returns

Gets next node which can be a container of a selection.
This methods mimics a behavior of right/left arrow keys in case of
collapsed selection. It does not return an exact position (with offset) though,
but just a selection's container.

Parameters

Moves the range boundaries to the closest editing point after/before an
element. ...

Moves the range boundaries to the closest editing point after/before an
element.

For example, if the start element has id="start",
<p><b>foo</b><span id="start">start</start></p>, the closest previous editing point is
<p><b>foo</b>^<span id="start">start</start></p> (between <b> and <span>).

Parameters

Transforms the startContainer and endContainer properties from text
nodes to element nodes, whenever possible. This is actually possible
if either of the boundary containers point to a text node, and its
offset is set to zero, or after the last char in the node.