Expand all

ve.ui.IndentationAction

Extends

Constructor

new ve.ui.IndentationAction(surface, [source]) #

Indentation action.

Parameters:

Name Type Attributes Description
surface ve.ui.Surface

Surface to act on

source string optional
Source:
Indentation action.

Methods

changeIndentation(indent) → {boolean} #

Change indentation of content.

Parameters:

Name Type Description
indent number

Indentation change, 1 or -1

Source:

Returns:

Indentation decrease occurred

Type
boolean
Change indentation of content.

decrease() → {boolean} #

Unindent content.

Source:

Returns:

Indentation decrease occurred

Type
boolean
Unindent content.

increase() → {boolean} #

Indent content.

Source:

Returns:

Indentation increase occurred

Type
boolean
Indent content.

indentListItem(listItem) #

Indent a list item.

Parameters:

Name Type Description
listItem ve.dm.ListItemNode

List item to indent

Source:

Throws:

listItem must be a ve.dm.ListItemNode

Type
Error
Indent a list item.

unindentListItem(listItem) #

Unindent a list item.

TODO: Refactor functionality into {ve.dm.SurfaceFragment}.

Parameters:

Name Type Description
listItem ve.dm.ListItemNode

List item to unindent

Source:

Throws:

listItem must be a ve.dm.ListItemNode

Type
Error
Unindent a list item.