About Editor URLs

On occasion, your app might want to redirect a site builder to their site's editor or to preview their site with any unpublished changes - for example, to lead them to make changes in your app's settings panel in the editor, or to review changes to the app or the site.

Before you begin

It’s important to note the following points before starting to code:

  • Embedded script extensions won't be displayed in the preview.

Use cases

Terminology

  • Editor: The platform site builders' use to build and edit their sites. Wix offers 3 editors for site builders:
  • Preview: A feature that enables site builders to see what any changes made on their site (in the editor, or in your app) will look like to visitors, without publishing the site. Wix recommends that site builders preview their sites to test how new changes and updates look before publishing them.
Was this helpful?
Yes
No

Sample flows

This article shares some possible use cases your app could support, as well as an example flow that could support each use case. You're certainly not limited to these use cases, but they can be a helpful jumping off point as you plan your app's implementation.

Direct site builders to their site editor

You might choose to direct site builders from within your app to the site editor, for example to place a visual extension in the site.

  1. Include a call to action that redirects to the editor - for example, a button.
  2. Whenever the site builder clicks the button, call the Get Editor URLs endpoint.
  3. Redirect the site builder to the URL provided in the editorUrl parameter.

Direct site builders to preview the latest changes

If a site builder makes changes to the app's behavior or UI, you might choose to direct them to preview those changes using Wix's site preview feature. This flow is equally relevant if you choose to direct them to preview changes made directly in the site editor.

  1. Include a call to action that redirects to preview the site - for example, a button.
  2. Whenever the site builder clicks the button, call the Get Editor URLs endpoint.
  3. Redirect the site builder to the URL provided in the previewUrl parameter.

Note: The site preview feature will not be able to display any embedded script extensions.

Was this helpful?
Yes
No

Editor Urls Object

The Editor URLs object provides a list of editor-related URLs, including a link to the site's editor interface (one of Wix Studio, Wix Editor, or Editor X), and a link to preview the site with the latest changes made in the editor.

Properties
editorTypestringRead-only
4 enum supported values:
UNKNOWNWIX_EDITOREDITOR_XWIX_STUDIO
Editor type.

editorUrlstringRead-onlymaxLength 2048format WEB_URL
Editor URL.

previewUrlstringRead-onlymaxLength 2048format WEB_URL
Preview URL.
Was this helpful?
Yes
No

GetGet Editor Urls

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Retrieves a site's Editor URLs.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Bookings Services and Settings
Learn more about permission scopes.
Endpoint
GET
https://www.wixapis.com/editor-urls/v2/editor-urls

Was this helpful?
Yes
No