Use the Browser Files
The browser folder of the download contains the spreadsheet editor as ready-to-use files for a plain HTML page. You copy the folder into your web application and load one script: no npm, bundler or server package is needed. Use the npm package instead when your application has an npm build.
What the Folder Contains
| File or folder | Contents |
|---|---|
tx-sheet-control.min.js | The editor. It defines the global TXTextControl.TXSheetControl namespace with the Spreadsheet class. |
tx-sheet-control.css | The style sheet of the editor. The script installs the editor's styles inside its Shadow DOM, so a page does not need to link this file. |
fonts/ | The fonts of the editor, their catalog catalog.json and their licenses |
languages/ | The interface texts in English and German as JSON files, en.json and de.json. The editor has both languages built in and does not load these files: use them as a starting point for your own resources, which you register with registerLanguage(). |
licenses/, LICENSE.txt | Third-party notices and the license agreement |
Add the Files to Your Application
Copy the whole
browserfolder into the static files of your web application, for example assheet. Keep thefontsfolder with its catalog, so that the editor finds its fonts.Load the script and create the editor in a host element with a height. Set
fontCatalogURLto the font catalog in the copied folder:<div id="sheet" style="height:600px"></div> <script src="./sheet/tx-sheet-control.min.js"></script> <script> const editor = new TXTextControl.TXSheetControl.Spreadsheet( document.getElementById('sheet'), { license: licenseText, fontCatalogURL: './sheet/fonts/catalog.json' } ); </script>Serve the page over HTTP or HTTPS, for example with the development server of your framework. A page opened directly from the file system stops with the error "A font catalog requires an HTTP or HTTPS URL."
licenseText is the content of your license file, tx-sheet-control.license, which your application supplies to the page. Licensing shows how, and the JavaScript tutorial builds the complete page.
Update to a New Release
Replace the whole folder with the browser folder of the new release. Do not mix files of different releases: the script and the fonts belong together.
Next Steps
- JavaScript tutorial: build a first page with the editor.
- Static Assets: serve the editor files in production.
- Licensing: what the license file contains and how to configure it.