WysiwygMarkerHelper

new WysiwygMarkerHelper(sqe)

Parameters:
Name Type Description
sqe SquireExt

squire instance

Methods

_extendRangeToTextNodeIfHasNone(range) → {boolean}

_extendRangeToTextNodeIfHasNone
Extend range to text node if start or end container have none
Containers of range should be text node

Parameters:
Name Type Description
range Range

range

Returns:
boolean -

success or fail

_findOffsetNode(offsetlist) → {Array.<object>}

_findOffsetNode
Find offset nodes by given offset list

Parameters:
Name Type Description
offsetlist Array.<number>

offset list

Returns:
Array.<object> -

offset node informations

_getExtraInfoOfRange(range) → {object}

_getExtraInfoOfRange
Get extra info of range

Parameters:
Name Type Description
range Range

range

Returns:
object -

extra info

clearSelect()

clearSelect
Clear selection of squire

getMarkerInfoOfCurrentSelection() → {object}

getMarkerInfoOfCurrentSelection
Get marker info of current selection

Returns:
object -

marker

getTextContent() → {string}

getTextContent
Get text content of wysiwyg

Returns:
string

selectOffsetRange(start, end)

selectOffsetRange
Make selection with given offset range

Parameters:
Name Type Description
start number

start offset

end number

end offset

updateMarkerWithExtraInfo(marker) → {object}

updateMarkerWithExtraInfo
Update marker with extra info of CodeMirror

Parameters:
Name Type Description
marker object

marker

Returns:
object -

marker