Expand all

abstract ve.ce.ImageNode

Constructor

new ve.ce.ImageNode($figure, [$image], [config])abstract #

ContentEditable image node.

Parameters:

Name Type Attributes Description
$figure jQuery

Image or figure element

$image jQuery optional

Actual image element, if $figure is just a container

config Object optional

Configuration options

Mixes in:
Source:
ContentEditable image node.

Properties

deleteCommandName #

Command to execute when Delete or Backspace is pressed while this node is focused.

Properties:

Type Description
string | null
Mixes in:
Source:
Command to execute when Delete or Backspace is pressed while this node is focused.

iconWhenInvisible #

Icon to use when the rendering is considered not visible, as defined in #hasRendering

No icon is show if null.

Properties:

Type Description
string | null
Mixes in:
Source:

Icon to use when the rendering is considered not visible, as defined in #hasRendering

No icon is show if null.

primaryCommandName #

Command to execute when Enter is pressed while this node is focused, or when the node is double-clicked.

Properties:

Type Description
string | null
Mixes in:
Source:
Command to execute when Enter is pressed while this node is focused, or when the node is double-clicked.

Methods

getRectsForElement($element, [relativeRect]) → {Object} #

Get rects for an element

Parameters:

Name Type Attributes Description
$element jQuery

Element to get highlights

relativeRect Object optional

Rect with top & left to get position relative to

Mixes in:
Source:

Returns:

Object containing rects and boundingRect

Type
Object
Get rects for an element

onAttributeChange(key, from, to) #

Update the rendering of the 'align', src', 'width' and 'height' attributes when they change in the model.

Parameters:

Name Type Description
key string

Attribute key

from string

Old value

to string

New value

Source:

Update the rendering of the 'align', src', 'width' and 'height' attributes when they change in the model.

onLoad(e) #

Handle the image load

Parameters:

Name Type Description
e jQuery.Event

Load event

Source:
Handle the image load

getDescription()static #