浏览代码

Improved docs.

Oskar Wróbel 8 年之前
父节点
当前提交
00dcb9e6a7

+ 3 - 0
packages/ckeditor5-engine/src/controller/datacontroller.js

@@ -229,6 +229,9 @@ export default class DataController {
 	 * {@link module:engine/view/documentfragment~DocumentFragment view document fragment} converted by the
 	 * {@link #viewToModel view to model converters}.
 	 *
+	 * When marker stamps were converted during conversion process then will be set as DocumentFragment
+	 * {@link module:engine/view/documentfragment~DocumentFragment#markers static markers map}.
+	 *
 	 * @param {module:engine/view/element~Element|module:engine/view/documentfragment~DocumentFragment} viewElementOrFragment
 	 * Element or document fragment which content will be converted.
 	 * @param {String} [context='$root'] Base context in which the view will be converted to the model. See:

+ 3 - 2
packages/ckeditor5-engine/src/conversion/viewconversiondispatcher.js

@@ -135,7 +135,8 @@ export default class ViewConversionDispatcher {
 	 * @param {Object} [additionalData] Additional data to be passed in `data` argument when firing `ViewConversionDispatcher`
 	 * events. See also {@link ~ViewConversionDispatcher#event:element element event}.
 	 * @returns {module:engine/model/documentfragment~DocumentFragment} Model data that is a result of the conversion process
-	 * wrapped by DocumentFragment.
+	 * wrapped by DocumentFragment. Converted marker stamps will be set as DocumentFragment
+	 * {@link module:engine/view/documentfragment~DocumentFragment#markers static markers map}.
 	 */
 	convert( viewItem, additionalData = {} ) {
 		this.fire( 'viewCleanup', viewItem );
@@ -143,7 +144,7 @@ export default class ViewConversionDispatcher {
 		const consumable = ViewConsumable.createFrom( viewItem );
 		const conversionResult = this._convertItem( viewItem, consumable, additionalData );
 
-		// When conversion output is not a Node or Element we just return it.
+		// In some cases conversion output doesn't have to be a node and in this case we do nothing additional with this data.
 		if ( !( conversionResult instanceof ModelNode || conversionResult instanceof ModelDocumentFragment ) ) {
 			return conversionResult;
 		}

+ 1 - 1
packages/ckeditor5-engine/src/model/documentfragment.js

@@ -29,7 +29,7 @@ export default class DocumentFragment {
 	 */
 	constructor( children ) {
 		/**
-		 * DocumentFragment static markers list. This is a list of names and {@link module:engine/model/range~Range ranges}
+		 * DocumentFragment static markers map. This is a list of names and {@link module:engine/model/range~Range ranges}
 		 * which will be set as Markers to {@link module:engine/model/document~Document#markers document markers collection}
 		 * when DocumentFragment will be inserted to the document.
 		 *