Browse Source

Docs fixes.

Maciej Bukowski 7 years ago
parent
commit
e1849a6f52

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

@@ -333,16 +333,13 @@ export default class Selection {
 	 *		const position = new Position( root, path );
 	 *		selection.setTo( position );
 	 *
-	 * 		// Sets collapsed selection at the position of given node and offset.
-	 *		const paragraph = writer.createElement( 'paragraph' );
+	 * 		// Sets collapsed selection at the position of the given node and an offset.
 	 *		selection.setTo( paragraph, offset );
 	 *
 	 *		// Sets selection inside the given  node.
-	 *		const paragraph = writer.createElement( 'paragraph' );
 	 *		selection.setTo( paragraph, 'in', { backward } );
 	 *
 	 *		// Sets selection on the given node.
-	 *		const paragraph = writer.createElement( 'paragraph' );
 	 *		selection.setTo( paragraph, 'on', { backward } );
 	 *
 	 * 		// Removes all selection's ranges.

+ 0 - 3
packages/ckeditor5-engine/src/model/writer.js

@@ -926,15 +926,12 @@ export default class Writer {
 	 *		writer.setSelection( position );
 	 *
 	 * 		// Sets collapsed selection at the position of the given node and an offset.
-	 *		const paragraph = writer.createElement( 'paragraph' );
 	 *		writer.setSelection( paragraph, offset );
 	 *
 	 *		// Sets selection inside the given node.
-	 *		const paragraph = writer.createElement( 'paragraph' );
 	 *		writer.setSelection( paragraph, 'in', { backward } );
 	 *
 	 *		// Sets selection on the given node.
-	 *		const paragraph = writer.createElement( 'paragraph' );
 	 *		writer.setSelection( paragraph, 'on', { backward } );
 	 *
 	 * 		// Removes all selection's ranges.

+ 0 - 3
packages/ckeditor5-engine/src/view/selection.js

@@ -426,15 +426,12 @@ export default class Selection {
 	 *		selection.setTo( position, { fake, label } );
 	 *
 	 * 		// Sets collapsed selection at the position of given item and offset.
-	 *		const paragraph = writer.createElement( 'paragraph' );
 	 *		selection.setTo( paragraph, offset, { fake, label } );
 	 *
 	 *		// Sets selection inside the item.
-	 *		const paragraph = writer.createElement( 'paragraph' );
 	 *		selection.setTo( paragraph, 'in', { backward, fake, label } );
 	 *
 	 *		// Sets selection on the item.
-	 *		const paragraph = writer.createElement( 'paragraph' );
 	 *		selection.setTo( paragraph, 'on', { backward, fake, label } );
 	 *
 	 * 		// Clears selection. Removes all ranges.

+ 0 - 3
packages/ckeditor5-engine/src/view/writer.js

@@ -63,15 +63,12 @@ export default class Writer {
 	 *		writer.setSelection( position, { fake, label } );
 	 *
 	 * 		// Sets collapsed selection at the position of given item and offset.
-	 *		const paragraph = writer.createElement( 'paragraph' );
 	 *		selection.setTo( paragraph, offset, { fake, label } );
 	 *
 	 *		// Sets selection inside the item.
-	 *		const paragraph = writer.createElement( 'paragraph' );
 	 *		selection.setTo( paragraph, 'in', { backward, fake, label } );
 	 *
 	 *		// Sets selection on the item.
-	 *		const paragraph = writer.createElement( 'paragraph' );
 	 *		selection.setTo( paragraph, 'on', { backward, fake, label } );
 	 *
 	 * 		// Removes all ranges.