|
|
@@ -40,15 +40,6 @@ import getSelectedContent from './utils/getselectedcontent';
|
|
|
export default class Model {
|
|
|
constructor() {
|
|
|
/**
|
|
|
- * All callbacks added by {@link module:engine/model/model~Model#change} or
|
|
|
- * {@link module:engine/model/model~Model#enqueueChange} methods waiting to be executed.
|
|
|
- *
|
|
|
- * @private
|
|
|
- * @type {Array.<Function>}
|
|
|
- */
|
|
|
- this._pendingChanges = [];
|
|
|
-
|
|
|
- /**
|
|
|
* Models markers' collection.
|
|
|
*
|
|
|
* @readonly
|
|
|
@@ -59,24 +50,35 @@ export default class Model {
|
|
|
/**
|
|
|
* Editors document model.
|
|
|
*
|
|
|
+ * @readonly
|
|
|
* @member {module:engine/model/document~Document}
|
|
|
*/
|
|
|
this.document = new Document( this );
|
|
|
|
|
|
/**
|
|
|
- * The last created and currently used writer instance.
|
|
|
+ * Schema for editors model.
|
|
|
+ *
|
|
|
+ * @readonly
|
|
|
+ * @member {module:engine/model/schema~Schema}
|
|
|
+ */
|
|
|
+ this.schema = new Schema();
|
|
|
+
|
|
|
+ /**
|
|
|
+ * All callbacks added by {@link module:engine/model/model~Model#change} or
|
|
|
+ * {@link module:engine/model/model~Model#enqueueChange} methods waiting to be executed.
|
|
|
*
|
|
|
* @private
|
|
|
- * @member {module:engine/model/writer~Writer}
|
|
|
+ * @type {Array.<Function>}
|
|
|
*/
|
|
|
- this._currentWriter = null;
|
|
|
+ this._pendingChanges = [];
|
|
|
|
|
|
/**
|
|
|
- * Schema for editors model.
|
|
|
+ * The last created and currently used writer instance.
|
|
|
*
|
|
|
- * @member {module:engine/model/schema~Schema}
|
|
|
+ * @private
|
|
|
+ * @member {module:engine/model/writer~Writer}
|
|
|
*/
|
|
|
- this.schema = new Schema();
|
|
|
+ this._currentWriter = null;
|
|
|
|
|
|
[ 'insertContent', 'deleteContent', 'modifySelection', 'getSelectedContent', 'applyOperation' ]
|
|
|
.forEach( methodName => this.decorate( methodName ) );
|