Expand all

ve.ui.ContentAction

Extends

Constructor

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

Content action.

Parameters:

Name Type Attributes Description
surface ve.ui.Surface

Surface to act on

source string optional
Source:
Content action.

Methods

cancel() → {boolean} #

Emit a surface cancel event

Source:

Returns:

Action was executed

Type
boolean
Emit a surface cancel event

changeDirectionality() → {boolean} #

Change directionality

Source:

Returns:

Action was executed

Type
boolean
Change directionality

focusContext() → {boolean} #

Move keyboard focus to the context menu.

Source:

Returns:

Action was executed

Type
boolean
Move keyboard focus to the context menu.

insert(content, [annotate], [collapseToEnd]) → {boolean} #

Insert content.

Parameters:

Name Type Attributes Description
content string | Array

Content to insert, can be either a string or array of data

annotate boolean optional

Content should be automatically annotated to match surrounding content

collapseToEnd boolean optional

Collapse selection to end after inserting

Source:

Returns:

Action was executed

Type
boolean
Insert content.

pasteSpecial() → {boolean} #

Paste special.

Source:

Returns:

Action was executed

Type
boolean
Paste special.

remove([key]) → {boolean} #

Remove content.

Parameters:

Name Type Attributes Description
key string optional

Trigger remove as if a key were pressed, either 'backspace' or 'delete'

Source:

Returns:

Action was executed

Type
boolean
Remove content.

select(selection) → {boolean} #

Select content.

Parameters:

Name Type Description
selection ve.dm.Selection
Source:

Returns:

Action was executed

Type
boolean
Select content.

selectAll() → {boolean} #

Select all content.

Source:

Returns:

Action was executed

Type
boolean
Select all content.

submit() → {boolean} #

Emit a surface submit event

Source:

Returns:

Action was executed

Type
boolean
Emit a surface submit event