TX Sheet Control

Use the Browser Files

Topic

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 folderContents
tx-sheet-control.min.jsThe editor. It defines the global TXTextControl.TXSheetControl namespace with the Spreadsheet class.
tx-sheet-control.cssThe 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.txtThird-party notices and the license agreement

Add the Files to Your Application

  1. Copy the whole browser folder into the static files of your web application, for example as sheet. Keep the fonts folder with its catalog, so that the editor finds its fonts.

  2. Load the script and create the editor in a host element with a height. Set fontCatalogURL to 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>
    
  3. 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