Răsfoiți Sursa

Docs: Improve the model.insertContent() sample docs.

Maciej Gołaszewski 7 ani în urmă
părinte
comite
53065448fa
1 a modificat fișierele cu 2 adăugiri și 1 ștergeri
  1. 2 1
      packages/ckeditor5-engine/src/model/model.js

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

@@ -307,7 +307,8 @@ export default class Model {
 	 *		editor.model.change( ( writer ) => {
 	 *			editor.model.insertContent( model, writer.createText( 'x' ), selection );
 	 *
-	 *			// The selection contains a range to be selected - ie can be used to set selection.
+	 *			// insertContent() modifies the passed selection instance so it can be used to set the document selection.
+	 *			// Note: This is not necessary when you passed document selection to insertContent().
 	 *			writer.setSelection( selection );
 	 *		} );
 	 *