|
|
@@ -7,6 +7,7 @@
|
|
|
* @module module:engine/model/documentfragment
|
|
|
*/
|
|
|
|
|
|
+import MarkerCollection from './markercollection';
|
|
|
import NodeList from './nodelist';
|
|
|
import Element from './element';
|
|
|
import Text from './text';
|
|
|
@@ -15,6 +16,10 @@ import isIterable from '@ckeditor/ckeditor5-utils/src/isiterable';
|
|
|
/**
|
|
|
* DocumentFragment represents a part of model which does not have a common root but it's top-level nodes
|
|
|
* can be seen as siblings. In other words, it is a detached part of model tree, without a root.
|
|
|
+ *
|
|
|
+ * DocumentFragment has own {@link module:engine/model/markercollection~MarkerCollection}. Markers from this collection
|
|
|
+ * will be set to the {@link module:engine/model/document~Document#markers document markers} by a
|
|
|
+ * {@link module:engine/model/writer~writer.insert} function.
|
|
|
*/
|
|
|
export default class DocumentFragment {
|
|
|
/**
|
|
|
@@ -25,6 +30,14 @@ export default class DocumentFragment {
|
|
|
*/
|
|
|
constructor( children ) {
|
|
|
/**
|
|
|
+ * DocumentFragment markers collection.
|
|
|
+ *
|
|
|
+ * @readonly
|
|
|
+ * @member {module:engine/model/markercollection~MarkerCollection}
|
|
|
+ */
|
|
|
+ this.markers = new MarkerCollection();
|
|
|
+
|
|
|
+ /**
|
|
|
* List of nodes contained inside the document fragment.
|
|
|
*
|
|
|
* @private
|