| 1234567891011121314151617181920212223242526272829303132333435363738 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>Title</title>
- </head>
- <script src="dist/js/client.js"></script>
- <body>
- <script>
- if (!window.Web) {
- window.Web = {}
- }
- </script>
- <script>
- const webClient = new Web.Client('127.0.0.1:3000');
- const sheetId = 'sheet1';
- webClient.ready(() => {
- const undoManager = webClient.getUndoManager();
- const swapBufferData = new Web.SwapData();
- const redoCommand = new Web.Command(sheetId, [
- new Web.InsertRow({
- index: 0,
- count: 5,
- buffer: swapBufferData
- })
- ]);
- const undoCommand = new Web.Command(sheetId, [
- new Web.RemoveRow({
- index: 0,
- count: 5,
- buffer: swapBufferData
- })
- ]);
- undoManager.performCommand(redoCommand, undoCommand);
- });
- </script>
- </body>
- </html>
|