Index: trunk/extensions/VisualEditor/modules/es/models/es.SurfaceModel.js |
— | — | @@ -120,6 +120,14 @@ |
121 | 121 | * (such as when replacing - delete, then insert) |
122 | 122 | */ |
123 | 123 | es.SurfaceModel.prototype.transact = function( transaction, isPartial ) { |
| 124 | + |
| 125 | + if(es.isArray(transaction)) { |
| 126 | + for( var i = 0; i < transaction.length; i++ ) { |
| 127 | + this.transact( transaction[i] ); |
| 128 | + } |
| 129 | + return; |
| 130 | + } |
| 131 | + |
124 | 132 | // console.log( 'tx:' + $.map( transaction.getOperations(), function(tx) { return tx.type; } ).join(",") |
125 | 133 | // + ' isPartial:' + isPartial ); |
126 | 134 | this.doc.commit( transaction ); |