Class range

Index

Constructor methods

Properties

Methods

Constructor methods

constructor(root: element): range

Parameters

Returns

range

constructor(root: document): range

Parameters

Returns

range

Properties

public collapsed: boolean

public document: document

public endContainer: any

public endOffset: number

public isDocRoot: boolean

public root: element

public startContainer: any

public startOffset: number

Methods

public checkBoundaryOfElement(element: element, checkType: number): boolean

Parameters

  • element: element
  • checkType: number

Returns

boolean

public checkEndOfBlock(): boolean

Returns

boolean

public checkReadOnly(): boolean

Returns

boolean

public checkStartOfBlock(): boolean

Returns

boolean

public clone(): range

Returns

range

public cloneContents(): documentFragment

Returns

documentFragment

public collapse(toStart?: boolean): Boolean

Parameters

  • toStart?: boolean optional

Returns

Boolean

public createBookmark(serializable: boolean): Object

Parameters

  • serializable: boolean

Returns

Object

public createBookmark2(normalized: boolean): Object

Parameters

  • normalized: boolean

Returns

Object

public createIterator(): iterator

Returns

iterator

public deleteContents(mergeThen?: boolean)

Parameters

  • mergeThen?: boolean optional

public endPath(): elementPath

Returns

elementPath

public enlarge(unit: number, excludeBrs?: boolean)

Parameters

  • unit: number
  • excludeBrs?: boolean optional

public extractContents(mergeThen?: boolean): documentFragment

Parameters

  • mergeThen?: boolean optional

Returns

documentFragment

public fixBlock(isStart: boolean, blockTag: Object): Object

Parameters

  • isStart: boolean
  • blockTag: Object

Returns

Object

public getBoundaryNodes(): { startNode: CKEDITOR.dom.node; endNode: CKEDITOR.dom.node; }

Returns

{ startNode: CKEDITOR.dom.node; endNode: CKEDITOR.dom.node; }

public getCommonAncestor(includeSelf: boolean, ignoreTextNode: boolean): element

Parameters

  • includeSelf: boolean
  • ignoreTextNode: boolean

Returns

element

public getEnclosedNode(): node

Returns

node

public getNextEditableNode(): Object

Returns

Object

public getNextNode(evaluator: Function, guard: Function, boundary: element): element

Parameters

  • evaluator: Function
  • guard: Function
  • boundary: element

Returns

element

public getPreviousEditableNode(): Object

Returns

Object

public getPreviousNode(evaluator: Function, guard: Function, boundary: element): element

Parameters

  • evaluator: Function
  • guard: Function
  • boundary: element

Returns

element

public getTouchedEndNode(): node

Returns

node

public getTouchedStartNode(): node

Returns

node

public insertNode(node: node)

Parameters

public moveToBookmark(bookmark: Object)

Parameters

  • bookmark: Object

public moveToElementEditEnd(target: Object): boolean

Parameters

  • target: Object

Returns

boolean

public moveToElementEditStart(target: Object): boolean

Parameters

  • target: Object

Returns

boolean

public moveToElementEditablePosition(element: element, isMoveToEnd: boolean): boolean

Parameters

  • element: element
  • isMoveToEnd: boolean

Returns

boolean

public moveToPosition(node: node, position: Object)

Parameters

  • node: node
  • position: Object

public moveToRange(range: range)

Parameters

public movetoClosestEditablePosition(element: element, isMoveToEnd: boolean): boolean

Parameters

  • element: element
  • isMoveToEnd: boolean

Returns

boolean

public optimize()

public optimizeBookmark()

public removeEmptyBlocksAtEnd(atEnd: boolean)

Parameters

  • atEnd: boolean

public scrollIntoView()

public selectNodeContents(node: node)

Parameters

public setEnd(endNode: node, endOffset: number)

Parameters

  • endNode: node
  • endOffset: number

public setEndAt(node: node, position: number)

Parameters

  • node: node
  • position: number

public setStart(startNode: node, startOffset: number)

Parameters

  • startNode: node
  • startOffset: number

public setStartAfter(node: node)

Parameters

public setStartAt(node: node, position: number)

Parameters

  • node: node
  • position: number

public setStartBefore(node: node)

Parameters

public shrink(mode: number, selectContents: boolean)

Parameters

  • mode: number
  • selectContents: boolean

public splitBlock(blockTag: Object): Object

Parameters

  • blockTag: Object

Returns

Object

public splitElement(toSplit: element): element

Parameters

Returns

element

public startPath(): elementPath

Returns

elementPath

public trim(ignoreStart?: boolean, ignoreEnd?: boolean)

Parameters

  • ignoreStart?: boolean optional
  • ignoreEnd?: boolean optional