Expand all

ve.ce.TableCaptionNode

Extends

Constructor

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

ContentEditable table caption node.

Parameters:

Name Type Attributes Description
model ve.dm.TableCaptionNode

Model to observe

config Object optional

Configuration options

Mixes in:
Source:
ContentEditable table caption node.

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.

detach() #

getChildNodeTypes() #

getDomPosition(offset) → {ve.ce.NodeAndOffset} #

Get the DOM position (node and offset) corresponding to a position in this node

The node/offset have the same semantics as a DOM Selection focusNode/focusOffset

Parameters:

Name Type Description
offset number

The offset inside this node of the required position

Inherited from:
Source:

Returns:

The DOM position; guaranteed to be this node's final DOM node

Type
ve.ce.NodeAndOffset

Get the DOM position (node and offset) corresponding to a position in this node

The node/offset have the same semantics as a DOM Selection focusNode/focusOffset

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() #

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.

getSlugAtOffset(offset) → {HTMLElement|null} #

Get a slug at an offset.

Parameters:

Name Type Description
offset number

Offset to get slug at

Inherited from:
Source:

Returns:

Type
HTMLElement | null
Get a slug at an offset.

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() #

onModelUpdate(transaction) #

Handles model update events.

Parameters:

Name Type Description
transaction ve.dm.Transaction
Inherited from:
Source:
Handles model update events.

onSetup() #

Handle setup event.

Inherited from:
Source:
Handle setup event.

onSlugClick(slugNode) #

Handle slug click events

Parameters:

Name Type Description
slugNode HTMLElement

Slug node clicked

Inherited from:
Source:
Handle slug click events

onSplice(index, deleteCount, […modelNodes]) #

Handle splice events.

ve.ce.Node objects are generated from the inserted ve.dm.Node objects, producing a view that's a mirror of its model.

Parameters:

Name Type Attributes Description
index number

Index to remove and or insert nodes at

deleteCount number

Number of nodes to remove

modelNodes ve.dm.BranchNode optional
repeatable

Variadic list of nodes to insert

Inherited from:
Source:
Handle splice events.

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'.

removeSlugs() #

Remove all slugs in this branch

Inherited from:
Source:
Remove all slugs in this branch

setLive(live) #

Set live state on child nodes.

Parameters:

Name Type Description
live boolean

New live state

Inherited from:
Source:
Set live state on child nodes.

setupBlockSlugs() #

Setup block slugs

Inherited from:
Source:
Setup block slugs

setupInlineSlugs() #

Setup inline slugs

Inherited from:
Source:
Setup inline slugs

setupSlugs(isBlock) #

Setup slugs where needed.

Existing slugs will be removed before new ones are added.

Parameters:

Name Type Description
isBlock boolean

Set up block slugs, otherwise setup inline slugs

Inherited from:
Source:
Setup slugs where needed.

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

updateTagName() #

Update the DOM wrapper.

WARNING: The contents, .data( 'view' ), the contentEditable property and any classes the wrapper already has will be moved to the new wrapper, but other attributes and any other information added using $.data() will be lost upon updating the wrapper. To retain information added to the wrapper, subscribe to the 'teardown' and 'setup' events, or override #initialize.

Inherited from:
Source:

Fires:

Update the DOM wrapper.

Events

setup() #

teardown() #