Cloud Spreadsheet
The JSS cloud extension provides a way to create collaborative spreadsheets. It requires Jspreadsheet Server running, which requires a special license.Documentation
Settings
Property | Description |
---|---|
url: string | The url point to the JSS server. Default: https://jspreadsheet.com/ |
path?: string | The route for the API. Default: api/ |
token: string | A valid signature to connect to the API and server. |
onbeforesend?: function(xhr: Object) => void | Intercept all Ajax request headers. |
onbeforecreate?: function(options: Object) => void | Intercept the configuration before creating the spreadsheet. |
Author
Jspreadsheet Pro Team.License
Available on the premium edition only.Installation
Please choose one of the following options// From NPM npm install @jspreadsheet/cloud // From CDN https://cdn.jsdelivr.net/npm/@jspreadsheet/cloud/dist/index.min.js
Example
Create an online spreadsheet from a remove cloud server.Browser
NPM
<html> <script src="https://jspreadsheet.com/v9/jspreadsheet.js"></script> <link rel="stylesheet" href="https://jspreadsheet.com/v9/jspreadsheet.css" type="text/css" /> <script src="https://jsuites.net/v4/jsuites.js"></script> <link rel="stylesheet" href="https://jsuites.net/v4/jsuites.css" type="text/css" /> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Material+Icons" /> <script src="https://cdn.jsdelivr.net/npm/@jspreadsheet/cloud/dist/index.min.js"></script> <div id="spreadsheet"></div> <script> // Set the license for both plugin and the spreadsheet jspreadsheet.setLicense('N2U3MzFkMWRlYWU1ZmNlYTFmMWMxNzUyNDc0MDJiNGUzM2M4MGVjMWQwMWI0MWQ2NzljMThkODk3MThkOTc2ZGM0NTA0NDA3ZmE1MDU3NDllZjllYzQ5NzJjYmMxOTBjMzU0MmExMmMwNTg2NDhmN2U5ZDg3MjE1ZjYwZDIwZDMsZXlKdVlXMWxJam9pU25Od2NtVmhaSE5vWldWMElpd2laR0YwWlNJNk1UWTRNVEF6T0RZMU9Td2laRzl0WVdsdUlqcGJJbXB6Y0hKbFlXUnphR1ZsZEM1amIyMGlMQ0pqYjJSbGMyRnVaR0p2ZUM1cGJ5SXNJbXB6YUdWc2JDNXVaWFFpTENKamMySXVZWEJ3SWl3aWJHOWpZV3hvYjNOMElsMHNJbkJzWVc0aU9pSXpJaXdpYzJOdmNHVWlPbHNpZGpjaUxDSjJPQ0lzSW5ZNUlpd2lZMmhoY25Seklpd2labTl5YlhNaUxDSm1iM0p0ZFd4aElpd2ljR0Z5YzJWeUlpd2ljbVZ1WkdWeUlpd2lZMjl0YldWdWRITWlMQ0pwYlhCdmNuUWlMQ0ppWVhJaUxDSjJZV3hwWkdGMGFXOXVjeUlzSW5ObFlYSmphQ0pkTENKa1pXMXZJanAwY25WbGZRPT0='); // Set the extensions jspreadsheet.setExtensions({ cloud }); // Cloud configuration jspreadsheet.cloud({ // URL to the JSS server url: 'https://jspreadsheet.com/', // Token signature token: 'MSxiYjBlNzlmYWYzNTBiY2UzYmFjYTljZGIzN2QyOGI3N2Q0YWQzOWI0', // Before sending ajax requests to the server onbeforesend: function(options) { console.log(options) } }); // Create the spreadsheet jspreadsheet(document.getElementById('spreadsheet'), { cloud: '844491c0-787a-4c7e-a43b-7e12035e7fc4', }); </script> </html>
// Import the JSS library import jspreadsheet from 'jspreadsheet'; // Import the JSS validation extension import cloud from '@jspreadsheet/cloud'; // Set the license for both plugin and the spreadsheet jspreadsheet.setLicense('N2U3MzFkMWRlYWU1ZmNlYTFmMWMxNzUyNDc0MDJiNGUzM2M4MGVjMWQwMWI0MWQ2NzljMThkODk3MThkOTc2ZGM0NTA0NDA3ZmE1MDU3NDllZjllYzQ5NzJjYmMxOTBjMzU0MmExMmMwNTg2NDhmN2U5ZDg3MjE1ZjYwZDIwZDMsZXlKdVlXMWxJam9pU25Od2NtVmhaSE5vWldWMElpd2laR0YwWlNJNk1UWTRNVEF6T0RZMU9Td2laRzl0WVdsdUlqcGJJbXB6Y0hKbFlXUnphR1ZsZEM1amIyMGlMQ0pqYjJSbGMyRnVaR0p2ZUM1cGJ5SXNJbXB6YUdWc2JDNXVaWFFpTENKamMySXVZWEJ3SWl3aWJHOWpZV3hvYjNOMElsMHNJbkJzWVc0aU9pSXpJaXdpYzJOdmNHVWlPbHNpZGpjaUxDSjJPQ0lzSW5ZNUlpd2lZMmhoY25Seklpd2labTl5YlhNaUxDSm1iM0p0ZFd4aElpd2ljR0Z5YzJWeUlpd2ljbVZ1WkdWeUlpd2lZMjl0YldWdWRITWlMQ0pwYlhCdmNuUWlMQ0ppWVhJaUxDSjJZV3hwWkdGMGFXOXVjeUlzSW5ObFlYSmphQ0pkTENKa1pXMXZJanAwY25WbGZRPT0='); // Set the extensions jspreadsheet.setExtensions({ cloud }); // Cloud configuration jspreadsheet.cloud({ // URL to the JSS server url: 'https://jspreadsheet.com/', // Token signature token: 'MSxiYjBlNzlmYWYzNTBiY2UzYmFjYTljZGIzN2QyOGI3N2Q0YWQzOWI0', // Before sending ajax requests to the server onbeforesend: function(options) { console.log(options) } }); // Create the spreadsheet jspreadsheet(document.getElementById('spreadsheet'), { cloud: '844491c0-787a-4c7e-a43b-7e12035e7fc4', });