Expand all

ve.ce.AlienInlineNode

Extends

Constructor

new ve.ce.AlienInlineNode(model, [config]) #

Parameters:

Name Type Attributes Description
model ve.dm.AlienInlineNode
config Object optional
Source:
ContentEditable alien inline node.

Properties

deleteCommandName #

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

Properties:

Type Description
string | null
Inherited from:
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
Inherited from:
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
Inherited from:
Mixes in:
Source:
Command to execute when Enter is pressed while this node is focused, or when the node is double-clicked.

Methods

autoFocus() → {boolean} #

Check if the node can take the cursor when its surface is focused

Inherited from:
Source:

Returns:

Node can be take the cursor

Type
boolean
Check if the node can take the cursor when its surface is focused

canContainContent() #

canHaveChildren() #

canHaveChildrenNotContent() #

destroy() #

Release all memory.

Inherited from:
Source:
Release all memory.

getAnnotatedHtml() → {Array} #

Get annotated HTML fragments.

Inherited from:
Source:
See:
  • ve.ce.ContentBranchNode

    An HTML fragment can be:

    • a plain text string
    • a jQuery object
    • an array with a plain text string or jQuery object at index 0 and a ve.dm.AnnotationSet at index 1, i.e. ['textstring', ve.dm.AnnotationSet] or [$jQueryObj, ve.dm.AnnotationSet]

    The default implementation should be fine in most cases. A subclass only needs to override this if the annotations aren't necessarily the same across the entire node (like in ve.ce.TextNode).

Returns:

Array of HTML fragments, i.e. [ string | jQuery | [string|jQuery, ve.dm.AnnotationSet] ]

Type
Array
Get annotated HTML fragments.

getChildNodeTypes() #

getLength() #

getModel() → {ve.dm.Model} #

Get the model the view observes.

Inherited from:
Source:

Returns:

Model the view observes

Type
ve.dm.Model
Get the model the view observes.

getModelHtmlDocument() → {HTMLDocument} #

Get the model's HTML document

Inherited from:
Source:

Returns:

Model document

Type
HTMLDocument
Get the model's HTML document

getOffset() #

getOuterLength() #

getParentNodeTypes() #

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

Inherited from:
Mixes in:
Source:

Returns:

Object containing rects and boundingRect

Type
Object
Get rects for an element

getResolvedAttribute(key) → {string} #

Get a resolved URL from a model attribute.

Parameters:

Name Type Description
key string

Attribute name whose value is a URL

Inherited from:
Source:

Returns:

URL resolved according to the document's base

Type
string
Get a resolved URL from a model attribute.

getSuggestedParentNodeTypes() #

handlesOwnChildren() #

hasSignificantWhitespace() #

initialize() #

Initialize this.$element. This is called by the constructor and should be called every time this.$element is replaced.

Inherited from:
Source:
Initialize this.$element.

isAlignable() #

isCellEditable() #

isCellable() #

isContent() #

isFocusable() #

If this is set to true it should implement:

setFocused( boolean val )
boolean isFocused()
Inherited from:
Source:
See:

If this is set to true it should implement:

setFocused( boolean val )
boolean isFocused()

isInternal() #

isLive() → {boolean} #

Check if the view is attached to the live DOM.

Inherited from:
Source:

Returns:

View is attached to the live DOM

Type
boolean
Check if the view is attached to the live DOM.

isMetaData() #

isMultiline() → {boolean} #

Check if the node is supports multiline input.

Traverses upstream until a boolean value is found. If no value is found, reads the default from the surface.

Inherited from:
Source:

Returns:

Node supports multiline input

Type
boolean
Check if the node is supports multiline input.

isUnwrappable() #

isWrapped() #

onSetup() #

Handle setup event.

Inherited from:
Source:
Handle setup event.

onTeardown() #

Handle teardown event.

Inherited from:
Source:
Handle teardown event.

removeEmptyLastChildOnEnter() → {boolean} #

Check if the node removes its empty last child on 'enter'.

Inherited from:
Source:

Returns:

Node removes empty last child on 'enter'

Type
boolean
Check if the node removes its empty last child on 'enter'.

setLive(live) #

Set live state.

Parameters:

Name Type Description
live boolean

The view has been attached to the live DOM (use false on detach)

Inherited from:
Source:

Fires:

Set live state.

shouldIgnoreChildren() #

splitOnEnter() → {boolean} #

Check if the node can be split.

Inherited from:
Source:

Returns:

Node can be split

Type
boolean
Check if the node can be split.

trapsCursor() → {boolean} #

Check if the node traps cursor when active

Inherited from:
Source:

Returns:

Node traps cursor

Type
boolean
Check if the node traps cursor when active

Events

setup() #

teardown() #