---
title: "Integrate Document Authoring (WYSIWYG library) using Vite"
canonical_url: "https://www.nutrient.io/sdk/document-authoring/getting-started/using-vite/"
md_url: "https://www.nutrient.io/sdk/document-authoring/getting-started/using-vite.md"
last_updated: "2026-10-13T13:26:42.316Z"
description: "Integrate Document Authoring — what you see is what you get (WYSIWYG) TypeScript library — into your web application using Vite for in-browser visual editing without external word processing software."
---

Add Document Authoring to a Vite project.

## Creating a new Vite project

```bash

npm create vite

# or

yarn create vite

# or

pnpm create vite

```

Change to the newly created project directory:

```

cd my-app

```

## Installing the library

For a new project, set up the environment to include `@nutrient-sdk/document-authoring`.

```bash

npm install @nutrient-sdk/document-authoring

# or

yarn add @nutrient-sdk/document-authoring

# or

pnpm install @nutrient-sdk/document-authoring

```

## Integrating into your project

1. Add an empty `<div>` element with a non-`static` `position` and a defined `width` and `height`. This is the target document object model (DOM) element where the editor loads:

   ```html

   <div id="editor" style="position: relative; width: 100%; height: 100vh;"></div>
   ```

2. Import the library:

   ```js

   import DocAuth from '@nutrient-sdk/document-authoring';

   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.

## Running the Vite dev server

```bash

npm run dev

# or

yarn dev

# or

pnpm dev

```

## Next steps

**[How Document Authoring works](https://www.nutrient.io/guides/document-authoring.md)**\
The system, editor, and document model.

**[Document data and formats](https://www.nutrient.io/guides/document-authoring/working-with-documents/overview.md)**\
Open and save DOCX, PDF, and DocJSON.
---

## Related pages

- [Getting started with Document Authoring](/sdk/document-authoring/getting-started.md)
- [Install from a CDN](/sdk/document-authoring/getting-started/using-cdn.md)
- [Install for Node.js](/sdk/document-authoring/getting-started/using-nodejs.md)
- [or](/sdk/document-authoring/getting-started/using-npm.md)
- [or](/sdk/document-authoring/getting-started/using-other-setups.md)

