Extends
Constructor
new ve.ui.ContentAction(surface, [source])
#
Hierarchy
Content action.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
surface |
ve.ui.Surface | Surface to act on |
|
source |
string |
optional |
Content action.
Methods
cancel() → {boolean}
#
Emit a surface cancel event
Returns:
Action was executed
- Type
- boolean
Emit a surface cancel event
changeDirectionality() → {boolean}
#
Change directionality
Returns:
Action was executed
- Type
- boolean
Change directionality
focusContext() → {boolean}
#
Move keyboard focus to the context menu.
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 |
Returns:
Action was executed
- Type
- boolean
Insert content.
pasteSpecial() → {boolean}
#
Paste special.
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' |
Returns:
Action was executed
- Type
- boolean
Remove content.
select(selection) → {boolean}
#
Select content.
Parameters:
Name | Type | Description |
---|---|---|
selection |
ve.dm.Selection |
Returns:
Action was executed
- Type
- boolean
Select content.
selectAll() → {boolean}
#
Select all content.
Returns:
Action was executed
- Type
- boolean
Select all content.
submit() → {boolean}
#
Emit a surface submit event
Returns:
Action was executed
- Type
- boolean
Emit a surface submit event