mirror of https://github.com/vector-im/riot-web
allow starting a range with both positions known already
we'll need this to start a range for the selectionpull/21833/head
parent
eb87301855
commit
0d02ab59d6
|
@ -394,11 +394,12 @@ export default class EditorModel {
|
|||
|
||||
/**
|
||||
* Starts a range, which can span across multiple parts, to find and replace text.
|
||||
* @param {DocumentPosition} position where to start the range
|
||||
* @param {DocumentPosition} positionA a boundary of the range
|
||||
* @param {DocumentPosition?} positionB the other boundary of the range, optional
|
||||
* @return {Range}
|
||||
*/
|
||||
startRange(position) {
|
||||
return new Range(this, position);
|
||||
startRange(positionA, positionB = positionA) {
|
||||
return new Range(this, positionA, positionB);
|
||||
}
|
||||
|
||||
//mostly internal, called from Range.replace
|
||||
|
|
Loading…
Reference in New Issue