Expand all

ve.ce.NodeFactory

Extends

Constructor

new ve.ce.NodeFactory() #

ContentEditable node factory.

Source:
ContentEditable node factory.

Methods

createFromModel(model) → {ve.ce.Node} #

Create a view node from a model node.

Parameters:

Name Type Description
model ve.dm.Node

Mode node

Source:

Returns:

View node

Type
ve.ce.Node

Throws:

Unknown object name

Type
Error
Create a view node from a model node.

getDescription(node) → {string} #

Get a plain text description of a node model.

Parameters:

Name Type Description
node ve.dm.Node

Node to describe

Source:

Returns:

Description of the node

Type
string

Throws:

Unknown node type

Type
Error
Get a plain text description of a node model.

splitNodeOnEnter(type) → {boolean} #

Check if a node type splits on Enter

Parameters:

Name Type Description
type string

Node type

Source:

Returns:

The node can have grandchildren

Type
boolean

Throws:

Unknown node type

Type
Error
Check if a node type splits on Enter