Offset

get#

Arguments:

  • element Node, Element, Dom

Returns the object with the selection offset (start and end). Return false if the focus is not in the editor or is not in the specified element.

var offset = this.app.offset.get(element);

set#

Arguments:

  • element Node, Element, Dom
  • value Object

Sets the selection in the element by the specified object.

this.app.offset.set(element, { start: 1, end: 10 });