|
|
@@ -149,6 +149,19 @@ export default class Schema {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * Returns all registered items.
|
|
|
+ *
|
|
|
+ * @returns {Object.<String,module:engine/model/schema~SchemaCompiledItemDefinition>}
|
|
|
+ */
|
|
|
+ getDefinitions() {
|
|
|
+ if ( !this._compiledDefinitions ) {
|
|
|
+ this._compile();
|
|
|
+ }
|
|
|
+
|
|
|
+ return this._compiledDefinitions;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* Returns a definition of the given item or `undefined` if item is not registered.
|
|
|
*
|
|
|
* @param {module:engine/model/item~Item|module:engine/model/schema~SchemaContextItem|String} item
|
|
|
@@ -522,19 +535,6 @@ export default class Schema {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * Returns all registered items.
|
|
|
- *
|
|
|
- * @returns {Object.<String,module:engine/model/schema~SchemaCompiledItemDefinition>}
|
|
|
- */
|
|
|
- getDefinitions() {
|
|
|
- if ( !this._compiledDefinitions ) {
|
|
|
- this._compile();
|
|
|
- }
|
|
|
-
|
|
|
- return this._compiledDefinitions;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
* Returns the lowest {@link module:engine/model/schema~Schema#isLimit limit element} containing the entire
|
|
|
* selection/range/position or the root otherwise.
|
|
|
*
|