Explorar o código

Remove new DocumentSelection from docs.

Maciej Gołaszewski %!s(int64=7) %!d(string=hai) anos
pai
achega
80b990266f

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

@@ -625,7 +625,7 @@ export default class Model {
 	 *
 	 *		// Creates selection from the given document selection.
 	 *		// Note: It doesn't copies selection attributes.
-	 *		const documentSelection = new DocumentSelection( doc );
+	 *		const documentSelection = model.document.selection;
 	 *		const selection = writer.createSelection( documentSelection );
 	 *
 	 *		// Creates selection at the given position.

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

@@ -53,7 +53,7 @@ export default class Selection {
 	 *
 	 *		// Creates selection from the given document selection.
 	 *		// Note: It doesn't copies selection attributes.
-	 *		const documentSelection = new DocumentSelection( doc );
+	 *		const documentSelection = model.document.selection;
 	 *		const selection = writer.createSelection( documentSelection );
 	 *
 	 *		// Creates selection at the given position.

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

@@ -1085,7 +1085,7 @@ export default class Writer {
 	 *		writer.setSelection( otherSelection );
 	 *
 	 *		// Sets selection to the given document selection.
-	 *		const documentSelection = new DocumentSelection( doc );
+	 *		const documentSelection = model.document.selection;
 	 *		writer.setSelection( documentSelection );
 	 *
 	 *		// Sets collapsed selection at the given position.