WwTextObject

WwTextObject

Constructor

new WwTextObject(wwe, range)

Parameters:
Name Type Description
wwe WysiwygEditor

wysiwygEditor

range Range

Range object

Methods

deleteContent()

Delete current selection content

expandEndOffset()

Expand end offset by one

expandStartOffset()

Expand start offset by one

getTextContent() → {string}

Get text content

Returns:
string

peekStartBeforeOffset(offset) → {string}

Peek previous element's content

Parameters:
Name Type Description
offset number

Offset to peek

Returns:
string

replaceContent(content)

Replace current selection content to given text

Parameters:
Name Type Description
content string

Text content

setEndBeforeRange(range)

setEnd range on start

Parameters:
Name Type Description
range Range

Range object

setRange(range)

Set _range object to given range object

Parameters:
Name Type Description
range Range

Range object