Skip to content

Run the editor from a local build

By default, editors' browsers load the DXPR Builder editor from the DXPR CDN, and you have nothing to set. This page is for developers who build the editor from source, to debug it or to test a change. At the end, the editor runs from files in the module folder, minified or readable. To keep the CDN behind a firewall, see Firewall and data residency instead.

Before you start

  • You need a git checkout of DXPR Builder with its Node packages installed. Releases from drupal.org contain no local build.
  • You need the Administer DXPR Builder configuration permission.

Set up

  1. In the module folder, run npx grunt build. It writes the editor to dxpr_builder/, minified and unminified.
  2. Go to DXPR Studio > DXPR Builder > General Settings (/admin/dxpr_studio/dxpr_builder/settings).
  3. Expand Editor Assets. The section only appears when a local build exists.
  4. Under Asset source, choose Local (minified) or Local (unminified).
  5. Click Save settings.

What you see

Reload a page in the builder. The browser now loads the editor scripts from the module's dxpr_builder/ folder on your own site, without the jwt parameter that CDN requests carry. Local (unminified) loads the readable .js files and Local (minified) the smaller .min.js files.

Settings

Option What loads Use it for
Cloud (default) The editor from cdn2.dxpr.com, with cdn.dxpr.com as fallback. Your product key goes with each request. every site installed from a release
Local (minified) dxpr_builder/*.min.js from the module folder testing a build as production runs it
Local (unminified) dxpr_builder/*.js from the module folder debugging

A local build always wins over Cloud. With Cloud selected, the site loads the unminified files, or the minified ones when only those exist. DXPR publishes cloud files for releases only, so a development checkout could not use them anyway.

If you don't see the local build

  • There is no Editor Assets section. The module's dxpr_builder/ folder holds no build. Run npx grunt build in a git checkout, then reload the settings page.
  • Only one Local option is offered. Only the minified or only the unminified files exist. Run the full npx grunt build, which writes both.
  • Cloud is selected, but local files still load. That is by design while a build exists. Remove dxpr_builder.js and dxpr_builder.min.js from dxpr_builder/ and clear caches at /admin/config/development/performance.
  • The editor does not appear and requests to cdn2.dxpr.com fail. A firewall or a content security policy blocks the CDN. Allow both CDN hosts; see Firewall and data residency.

What's next?

Something wrong or missing on this page? Report it or edit the page.