support update callback setting selection instead of caret
This commit is contained in:
parent
037ac29c57
commit
2ea556e0b4
3 changed files with 40 additions and 10 deletions
|
@ -433,7 +433,12 @@ export default class EditorModel {
|
|||
*/
|
||||
transform(callback) {
|
||||
const pos = callback();
|
||||
const acPromise = this._setActivePart(pos, true);
|
||||
let acPromise = null;
|
||||
if (!(pos instanceof Range)) {
|
||||
acPromise = this._setActivePart(pos, true);
|
||||
} else {
|
||||
acPromise = Promise.resolve();
|
||||
}
|
||||
this._updateCallback(pos);
|
||||
return acPromise;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue