Namespace

NodeOperation

NodeOperation

Methods

# addChild(el, node)

Create a child node.
Parameters:
Name Type Description
el TargetElement Target element return by E('...'), default value: currentTarget.
node node New node information.

View Source nodeOperation.ts, line 253

Example
addChild(E('bd4313fbac40284b'))

# beginEdit(el)

Begin to edit the target node.
Parameters:
Name Type Description
el TargetElement Target element return by E('...'), default value: currentTarget.

View Source nodeOperation.ts, line 546

Example
beginEdit(E('bd4313fbac40284b'))

# copyNode(node, to)

Copy node to another node.
Parameters:
Name Type Description
node TargetElement Target element return by E('...'), default value: currentTarget.
to TargetElement The target(as parent node) you want to copy to.

View Source nodeOperation.ts, line 282

Example
copyNode(E('bd4313fbac402842'),E('bd4313fbac402839'))

# insertBefore(el, node)

Create a sibling node before the selected node.
Parameters:
Name Type Description
el TargetElement Target element return by E('...'), default value: currentTarget.
node node New node information.

View Source nodeOperation.ts, line 122

Example
insertBefore(E('bd4313fbac40284b'))

# insertParent(el, node)

Create a parent node of the selected node.
Parameters:
Name Type Description
el TargetElement Target element return by E('...'), default value: currentTarget.
node node New node information.

View Source nodeOperation.ts, line 167

Example
insertParent(E('bd4313fbac40284b'))

# insertSibling(el, node)

Create a sibling node.
Parameters:
Name Type Description
el TargetElement Target element return by E('...'), default value: currentTarget.
node node New node information.

View Source nodeOperation.ts, line 77

Example
insertSibling(E('bd4313fbac40284b'))

# moveDownNode(el)

Move the target node down.
Parameters:
Name Type Description
el TargetElement Target element return by E('...'), default value: currentTarget.

View Source nodeOperation.ts, line 332

Example
moveDownNode(E('bd4313fbac40284b'))

# moveNode(from, to)

Move a node to another node (as child node).
Parameters:
Name Type Description
from TargetElement The target you want to move.
to TargetElement The target(as parent node) you want to move to.

View Source nodeOperation.ts, line 419

Example
moveNode(E('bd4313fbac402842'),E('bd4313fbac402839'))

# moveNodeAfter(from, to)

Move a node and become next node of another node.
Parameters:
Name Type Description
from TargetElement
to TargetElement

View Source nodeOperation.ts, line 515

Example
moveNodeAfter(E('bd4313fbac402842'),E('bd4313fbac402839'))

# moveNodeBefore(from, to)

Move a node and become previous node of another node.
Parameters:
Name Type Description
from TargetElement
to TargetElement

View Source nodeOperation.ts, line 484

Example
moveNodeBefore(E('bd4313fbac402842'),E('bd4313fbac402839'))

# moveUpNode(el)

Move the target node up.
Parameters:
Name Type Description
el TargetElement Target element return by E('...'), default value: currentTarget.

View Source nodeOperation.ts, line 308

Example
moveUpNode(E('bd4313fbac40284b'))

# removeNode(el)

Remove the target node.
Parameters:
Name Type Description
el TargetElement Target element return by E('...'), default value: currentTarget.

View Source nodeOperation.ts, line 361

Example
removeNode(E('bd4313fbac40284b'))