PitchHut
Log in / Sign up
zetajs
4 views
Elevate your web experience with seamless in-browser office capabilities.
Pitch

zeta.js integrates ZetaOffice into your website, providing a powerful JavaScript wrapper that enables easy control of an in-browser office suite. Whether for custom text editing, spreadsheet functionalities, or background document conversion, zeta.js enhances user interaction while simplifying development. Explore the possibilities with our robust library and demo examples.

Description

zetajs is an innovative JavaScript library designed to seamlessly integrate ZetaOffice into your web applications, providing you with powerful and flexible office capabilities directly in the browser. This library utilizes the LibreOffice UNO (Universal Network Objects) technology, enabling users to control and manipulate documents, spreadsheets, and presentations through JavaScript.

With zetajs, you can create:

  • In-browser Office Suite: Build an online office workflow that closely resembles its desktop version.
  • Custom Editing Tools: Embed tailored text and spreadsheet editing functionalities into your website.
  • Headless Document Conversion: Leverage a background instance of zetajs for efficient document handling and conversion tasks.

Key Features

  • Rich JavaScript API: Access all the powerful features of LibreOffice through a user-friendly JavaScript wrapper.
  • Demos and Examples: Explore creative implementations of zetajs in the demo and examples sections to kickstart your own projects.
  • Easy Setup: You can begin using zetajs without needing your own LibreOffice WASM build, as it leverages the ZetaOffice CDN.

Example Usage

Here are a couple of quick examples demonstrating the ease of use that zetajs offers:

Load a Document

const css = zetajs.uno.com.sun.star;
const desktop = css.frame.Desktop.create(zetajs.getUnoComponentContext());
let xModel = desktop.getCurrentFrame().getController().getModel();
if (xModel === null || !zetajs.fromAny(xModel.queryInterface(zetajs.type.interface(css.text.XTextDocument)))) {
    xModel = desktop.loadComponentFromURL('file:///android/default-document/example.odt', '_default', 0, []);
}

Change Paragraph Colors

const xText = xModel.getText();
const xParaEnumeration = xText.createEnumeration();
for (const next of xParaEnumeration) {
    const xParagraph = zetajs.fromAny(next);
    const color = Math.floor(Math.random() * 0xFFFFFF);
    xParagraph.setPropertyValue("CharColor", color);
}

Learn More

For more extensive information about the functionalities of zetajs and to dive deeper into the documentation, visit here. If you're interested in building or debugging your own version of ZetaOffice, additional information and resources are also available on the ZetaOffice website.

With zetajs, you empower your web applications with robust office capabilities, all while retaining the simplicity and flexibility of JavaScript.