Expand all

ve.ce.StrikethroughAnnotation

Extends

Constructor

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

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

Source:
ContentEditable strikethrough annotation.

Methods

appendChild(childNode) #

Append a child node to the annotation

Parameters:

Name Type Description
childNode Node

Child node to append

Inherited from:
Source:
Append a child node to the annotation

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
Check if the annotation can be active

destroy() #

Release all memory

Inherited from:
Source:
Release all memory

getContentContainer() → {HTMLElement} #

Get the container into which annotation contents should be appended

Inherited from:
Source:

Returns:

Content container

Type
HTMLElement
Get the container into which annotation contents should be appended

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|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
Get an HTML document from the model, to use for URL resolution.

getParentNode() → {ve.ce.ContentBranchNode|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
Get the content branch node this annotation is rendered in, if any.

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.

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.

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.

onSetup() #

Handle setup event.

Inherited from:
Source:
Handle setup event.

onTeardown() #

Handle teardown event.

Inherited from:
Source:
Handle teardown event.

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.

Events

setup() #

teardown() #