This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /sdk/document-authoring/getting-started/using-other-setups.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. Integrate Document Authoring (WYSIWYG library) using other setups

Other setups

If you’re not using a bundler such as Vite, webpack, or Rollup, you can include the Document Authoring library in one of three ways. Copy the main entry point file into your project, serve your node_modules directory, or use import maps(opens in a new tab) to define module imports. This guide will cover the first option as an example.

If you’re looking to self-host all assets, refer to the self-hosting assets guide.

You can also load everything directly from the content delivery network (CDN) with a single script tag.

Type definitions and module systems

The package includes type definitions and support for CommonJS, ECMAScript modules (ESM), Asynchronous Module Definition (AMD), and a global DocAuth object. Your build tools resolve these automatically from its package.json file.

Requirements

Adding to your project

Terminal window
npm i @nutrient-sdk/document-authoring

Integrating into your project

  1. Copy docauth.es.js from node_modules/@nutrient-sdk/document-authoring/lib/ to your public directory (e.g. public/js/).

  2. Import the library:

    const DocAuth = await import('/lib/docauth.es.js');
    const system = await DocAuth.createDocAuthSystem();
    const editor = await system.createEditor(document.getElementById('editor'), {
    document: await system.createDocumentFromPlaintext('Hello, world!'),
    });

    For licensed deployments, pass your license key as the licenseKey property when you call createDocAuthSystem(). The key is optional for evaluation builds.

Next steps

How Document Authoring works
The system, editor, and document model.

Document data and formats
Open and save DOCX, PDF, and DocJSON.