Skip to main content

Document Builder

This guide walks you through embedding Unlayer's drag-and-drop document builder into your web application. The document builder lets your users create reports, proposals, contracts, and other structured documents.


Step 1: Install the SDK

Add the script tag to your HTML:

<script src="https://editor.unlayer.com/embed.js"></script>

Step 2: Initialize the Editor

Set displayMode to document to load the document builder.

Recommended Size

For the best experience, ensure the editor container is at least 1024px wide and 700px high. The editor will expand to fill the entire container.

<div id="editor-container" style="height: 700px;"></div>

<script>
unlayer.init({
id: 'editor-container',
displayMode: 'document',
projectId: 1234, // Replace with your project ID
});
</script>

Where to get the Project ID?

  1. Log in to the Developer Console
  2. Create a Project
  3. You can find the project ID in Project > Builder > Settings

What's Next