Skip to main content

Custom Tool Renders as “Missing”

When using Unlayer's Export APIs (e.g., export to HTML, PDF, or Image), custom tools may appear as "Missing" in the exported content. This typically happens when the builder cannot load the custom tool files or the tool lacks proper export configuration.

Khizar Tanveer avatar
Written by Khizar Tanveer
Updated over 3 months ago

Fixing Export Issues with Custom Tools in Unlayer

If your custom tool isn’t appearing correctly during the export process (e.g., when using exportHtml, exportPdf, etc.), it’s often due to missing exporters or inaccessible scripts.

Common Causes

  • The custom tool’s JavaScript file isn’t publicly accessible during the export process.

  • The tool registration doesn’t define the required exporters for the relevant display modes.


How to Fix It

1. Host Custom Tool Files Publicly

Ensure your custom tool’s script is hosted at a public URL, such as:

  • AWS S3

  • GitHub Pages

  • Any public CDN

Then include the hosted script using the customJS parameter both when initializing the editor and when calling the export APIs:

unlayer.init({
// other settings...
customJS: "https://yourdomain.com/custom-tool.js",
});

2. Define Exporters in registerTool

Your custom tool must define exporters for every displayMode you plan to support — for example, email, web, popup, or document.

Did this answer your question?