Extends
Constructor
new ve.ui.PreviewElement([model], [config])
#
Hierarchy
Creates a ve.ui.PreviewElement object.
Parameters:
Name | Type | Attributes | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
model |
ve.dm.Node |
optional |
Model from which to create a preview |
||||||||||
config |
Object |
optional |
Configuration options Properties:
|
- Mixes in:
- Source:
Creates a ve.ui.PreviewElement object.
Methods
afterRender()
#
Cleanup and emit events after render
Fires:
Cleanup and emit events after render
beforeAppend(element)
#
Modify DOM node before appending to the preview
Parameters:
Name | Type | Description |
---|---|---|
element |
HTMLElement | Element to be appended |
Modify DOM node before appending to the preview
destroy()
#
Destroy the preview node.
Destroy the preview node.
isGenerating() → {boolean}
#
Check if the preview is still generating
Returns:
Still generating
- Type
- boolean
Check if the preview is still generating
replaceWithModelDom()
#
Replace the content of the body with the model DOM
Doesn't use jQuery to avoid document switching performance bug
Replace the content of the body with the model DOM
Doesn't use jQuery to avoid document switching performance bug
setModel(model)
#
Set the model node for the preview
Parameters:
Name | Type | Description |
---|---|---|
model |
ve.dm.Node | Model from which to create a preview |
Set the model node for the preview
updatePreview()
#
Update the preview
Update the preview
Events
render()
#
The element rendering has been updated
The element rendering has been updated