WwTableManager

WwTableManager

Constructor

new WwTableManager(wwe)

Parameters:
Name Type Description
wwe WysiwygEditor

WysiwygEditor instance

Members

static this.name :string

Name property

Methods

_changeSelectionToTargetCell(currentCell, range, direction, scale)

Change selection to sibling cell

Parameters:
Name Type Description
currentCell HTMLElement

current TD or TH

range Range

Range object

direction string

'next' or 'previous'

scale string

'row' or 'cell'

_onPaste(ev)

On paste.

Parameters:
Name Type Description
ev MouseEvent

event

destroy()

Destroy.

getTableIDClassName() → {string}

Return new table ID class name string

Returns:
string

isInTable(range) → {boolean}

isInTable
Check whether passed range is in table or not

Parameters:
Name Type Description
range Range

range

Returns:
boolean -

result

isNonTextDeleting(range) → {boolean}

Return whether delete non text or not

Parameters:
Name Type Description
range Range

Range object

Returns:
boolean

prepareToPasteOnTable(pasteData, node) → {DocumentFragment}

Prepare to paste data on table

Parameters:
Name Type Description
pasteData object

Pasting data

node HTMLElement

Current pasting element

Returns:
DocumentFragment

prepareToTableCellStuffing($trs) → {Object}

Prepare to table cell stuffing

Parameters:
Name Type Description
$trs jQuery

jQuery wrapped TRs

Returns:
Object

resetLastCellNode()

Reset _lastCellNode to null

setLastCellNode(node)

Set _lastCellNode to given node

Parameters:
Name Type Description
node HTMLElement

Table cell

tableCellAppendAidForTableElement(node)

Append table cells

Parameters:
Name Type Description
node HTMLElement

Table element

wrapDanglingTableCellsIntoTrIfNeed(fragment) → {HTMLElement|null}

Wrap dangling table cells with new TR

Parameters:
Name Type Description
fragment DocumentFragment

Pasting data

Returns:
HTMLElement | null

wrapTheadAndTbodyIntoTableIfNeed(fragment) → {HTMLElement|null}

Wrap THEAD followed by TBODY both into Table

Parameters:
Name Type Description
fragment DocumentFragment

Pasting data

Returns:
HTMLElement | null

wrapTrsIntoTbodyIfNeed(fragment) → {HTMLElement|null}

Wrap TRs with new TBODY

Parameters:
Name Type Description
fragment DocumentFragment

Pasting data

Returns:
HTMLElement | null