Schema
Class defined in model/data/Schema.js#10

Schema for Data Objects.

new Schema()
Constructor defined in model/data/Schema.js#16
this.addNodes(nodes)
Method defined in model/data/Schema.js#45

Add nodes to the schema.

Parameters

nodes | Array | Array of Node classes

this.getNodeClass(name)
Method defined in model/data/Schema.js#69

Get the node class for a type name.

Parameters

name | String |

Returns

Class |

this.getBuiltIns()
Method defined in model/data/Schema.js#79

Provide all built-in node classes.

Returns

Node[] | An array of Node classes.

this.isInstanceOf(type, parentType)
Method defined in model/data/Schema.js#90

Checks if a given type is of given parent type.

Parameters

type | String |
parentType | String |

Returns

Boolean | true if type is and instance of parentType.

this.each(callback, context)
Method defined in model/data/Schema.js#106

Iterate over all registered node classes.

See util/Registry#each

Parameters

callback | Function |
context | Object |

this.getDefaultTextType()
Method defined in model/data/Schema.js#120
Returns

String | the name of the default textish node (e.g. 'paragraph')