Report an issue
Class

CKEDITOR.dom.selection

class

Manipulates the selection within a DOM element. If the current browser selection spans outside of the element, an empty selection object is returned.

Despite the fact that selection's constructor allows to create selection instances, usually it's better to get selection from the editor instance:

var sel = editor.getSelection();

See CKEDITOR.editor.getSelection.

Filtering

Properties

  • since 4.5.7 readonly

    FILLING_CHAR_SEQUENCE : String

    The sequence used in a WebKit-based browser to create a Filling Character. By default it is a string of 7 zero-width space characters (U+200B).

  • readonly

    document : document

    Document in which selection is anchored.

  • readonly

    isFake : Boolean

    Whether selection is a fake selection.

    See fake method.

  • readonly

    isLocked : Boolean

    Whether selection is locked (cannot be modified).

    See lock and unlock methods.

  • since 4.3.0 readonly

    rev : Number

    Selection's revision. This value is incremented every time new selection is created or existing one is modified.

  • readonly

    root : element

    Selection's root element.

Methods