mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 10:35:48 +00:00
Fix for turning single elements in tables cells into listItems
This commit is contained in:
parent
959963cf6e
commit
8b1c0ff4ee
|
@ -75,16 +75,18 @@ es.ListButtonTool.prototype.onClick = function() {
|
||||||
}
|
}
|
||||||
data = data.concat( [ { 'type': '/list' } ] );
|
data = data.concat( [ { 'type': '/list' } ] );
|
||||||
|
|
||||||
tx = this.toolbar.surfaceView.model.getDocument().prepareRemoval(
|
|
||||||
new es.Range( insertAt, insertAt+removeLength)
|
|
||||||
);
|
|
||||||
this.toolbar.surfaceView.model.transact( tx );
|
|
||||||
|
|
||||||
tx = this.toolbar.surfaceView.model.getDocument().prepareInsertion(
|
tx = this.toolbar.surfaceView.model.getDocument().prepareInsertion(
|
||||||
insertAt,
|
insertAt,
|
||||||
data
|
data
|
||||||
);
|
);
|
||||||
this.toolbar.surfaceView.model.transact( tx );
|
this.toolbar.surfaceView.model.transact( tx );
|
||||||
|
|
||||||
|
tx = this.toolbar.surfaceView.model.getDocument().prepareRemoval(
|
||||||
|
new es.Range( insertAt+data.length, insertAt+removeLength+data.length)
|
||||||
|
);
|
||||||
|
this.toolbar.surfaceView.model.transact( tx );
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue