Extends
Constructor
new ve.ce.StrikethroughAnnotation(model, [parentNode], [config])
#
Hierarchy
ContentEditable strikethrough annotation.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
model |
ve.dm.StrikethroughAnnotation | Model to observe |
|
parentNode |
ve.ce.ContentBranchNode |
optional |
Node rendering this annotation |
config |
Object |
optional |
Configuration options |
Methods
appendChild(childNode)
#
Append a child node to the annotation
Parameters:
Name | Type | Description |
---|---|---|
childNode |
Node | Child node to append |
- Inherited from:
- Source:
appendTo(node)
#
Append the completed annotation to a parent node
#attachContents should have been called first
Parameters:
Name | Type | Description |
---|---|---|
node |
Node | Parent node |
- Inherited from:
- Source:
Append the completed annotation to a parent node
#attachContents should have been called first
attachContents()
#
Attach completed contents to the annotation as descendant nodes, if not already attached
No further contents should be appended into the content container after calling this
- Inherited from:
- Source:
Attach completed contents to the annotation as descendant nodes, if not already attached
No further contents should be appended into the content container after calling this
canBeActive() → {boolean}
#
Check if the annotation can be active
- Inherited from:
- Source:
Returns:
- Type
- boolean
destroy()
#
Release all memory
- Inherited from:
- Source:
getContentContainer() → {HTMLElement}
#
Get the container into which annotation contents should be appended
- Inherited from:
- Source:
Returns:
Content container
- Type
- HTMLElement
getModel() → {ve.dm.Model}
#
Get the model the view observes.
- Inherited from:
- Source:
Returns:
Model the view observes
- Type
- ve.dm.Model
getModelHtmlDocument() → {HTMLDocument|null
}
#
null
}
#
Get an HTML document from the model, to use for URL resolution.
The default implementation returns null; subclasses should override this if they can provide a resolution document.
- Inherited from:
- Source:
- See:
Returns:
HTML document to use for resolution, or null if not available
- Type
-
HTMLDocument
|
null
getParentNode() → {ve.ce.ContentBranchNode|null
}
#
null
}
#
Get the content branch node this annotation is rendered in, if any.
- Inherited from:
- Source:
Returns:
Content branch node or null if none
- Type
-
ve.ce.ContentBranchNode
|
null
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
getTagName()
#
- Inherited from:
- Source:
initialize()
#
Initialize this.$element. This is called by the constructor and should be called every time this.$element is replaced.
- Inherited from:
- Source:
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
onSetup()
#
Handle setup event.
- Inherited from:
- Source:
onTeardown()
#
Handle teardown event.
- Inherited from:
- Source:
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:
Events
setup()
#
- Inherited from:
- Source:
teardown()
#
- Inherited from:
- Source: