Extends
Constructor
new ve.ce.UnrenderedNode(model, [config])
#
ContentEditable unrendered node
Used for nodes which aren't children of attachedRoot
Can be linked to any type of model node.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
model |
ve.dm.Node | ||
config |
Object |
optional |
ContentEditable unrendered node
Used for nodes which aren't children of attachedRoot
Can be linked to any type of model 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
canContainContent()
#
- Inherited from:
- Source:
- See:
canHaveChildren()
#
- Inherited from:
- Source:
- See:
canHaveChildrenNotContent()
#
- Inherited from:
- Source:
- See:
destroy()
#
Release all memory.
- Inherited from:
- Source:
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
getChildNodeTypes()
#
- Inherited from:
- Source:
- See:
getLength()
#
- Inherited from:
- Source:
- See:
getModel() → {ve.dm.Model}
#
Get the model the view observes.
- Inherited from:
- Source:
Returns:
Model the view observes
- Type
- ve.dm.Model
getModelHtmlDocument() → {HTMLDocument}
#
getOffset()
#
- Inherited from:
- Source:
- See:
getOuterLength()
#
- Inherited from:
- Source:
- See:
getParentNodeTypes()
#
- Inherited from:
- Source:
- See:
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
getSuggestedParentNodeTypes()
#
- Inherited from:
- Source:
- See:
handlesOwnChildren()
#
- Inherited from:
- Source:
- See:
hasSignificantWhitespace()
#
- Inherited from:
- Source:
- See:
initialize()
#
Initialize this.$element. This is called by the constructor and should be called every time this.$element is replaced.
- Inherited from:
- Source:
isAlignable()
#
- Inherited from:
- Source:
- See:
isCellEditable()
#
- Inherited from:
- Source:
- See:
isCellable()
#
- Inherited from:
- Source:
- See:
isContent()
#
- Inherited from:
- Source:
- See:
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()
#
- Inherited from:
- Source:
- See:
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
isMetaData()
#
- Inherited from:
- Source:
- See:
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
isUnwrappable()
#
- Inherited from:
- Source:
- See:
isWrapped()
#
- Inherited from:
- Source:
- See:
onSetup()
#
Handle setup event.
- Inherited from:
- Source:
onTeardown()
#
Handle teardown event.
- Inherited from:
- Source:
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
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:
shouldIgnoreChildren()
#
- Inherited from:
- Source:
- See:
splitOnEnter() → {boolean}
#
Check if the node can be split.
- Inherited from:
- Source:
Returns:
Node can be split
- Type
- boolean
trapsCursor() → {boolean}
#
Check if the node traps cursor when active
- Inherited from:
- Source:
Returns:
Node traps cursor
- Type
- boolean
Events
setup()
#
- Inherited from:
- Source:
teardown()
#
- Inherited from:
- Source: