Fix for turning single elements in tables cells into listItems

This commit is contained in:
Inez Korczynski 2011-12-06 00:49:00 +00:00
parent 959963cf6e
commit 8b1c0ff4ee

View file

@ -75,16 +75,18 @@ es.ListButtonTool.prototype.onClick = function() {
}
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(
insertAt,
data
);
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 );
}
};