|
|
@@ -135,8 +135,7 @@ setData._parse = parse;
|
|
|
* const text = new Text( 'foobar' );
|
|
|
* const b = new Element( 'b', null, text );
|
|
|
* const p = new Element( 'p', null, b );
|
|
|
- * const selection = new Selection();
|
|
|
- * selection.setTo( Range.createFromParentsAndOffsets( text, 1, text, 5 ) );
|
|
|
+ * const selection = new Selection( [ Range.createFromParentsAndOffsets( text, 1, text, 5 ) ] );
|
|
|
*
|
|
|
* stringify( p, selection ); // '<p><b>f{ooba}r</b></p>'
|
|
|
*
|
|
|
@@ -148,8 +147,10 @@ setData._parse = parse;
|
|
|
*
|
|
|
* const text = new Text( 'foobar' );
|
|
|
* const selection = new Selection();
|
|
|
- * selection.setTo( Range.createFromParentsAndOffsets( text, 0, text, 1 ) );
|
|
|
- * selection.setTo( Range.createFromParentsAndOffsets( text, 3, text, 5 ) );
|
|
|
+ * selection.setTo( [
|
|
|
+ Range.createFromParentsAndOffsets( text, 0, text, 1 ) ),
|
|
|
+ * Range.createFromParentsAndOffsets( text, 3, text, 5 ) )
|
|
|
+ * ] );
|
|
|
*
|
|
|
* stringify( text, selection ); // '{f}oo{ba}r'
|
|
|
*
|