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.
Terminology
- Editor: The platform site builders' use to build and edit their sites. Wix offers 3 editors for site builders:
- Wix Studio
- Wix Editor
- Editor X - partially deprecated
- 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
Setup
To use the Editor API, install the @wix/urls
package using npm or Yarn:
Copy
1npm install @wix/urls
or
Copy
1yarn add @wix/urls
Then import { editor }
from @wix/urls
:
Copy
1import { editor } from '@wix/urls'
Was this helpful?
Yes
No
getEditorUrls( )
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:Learn more about permission scopes.
Copy
function getEditorUrls(): Promise<GetEditorUrlsResponse>
Request
This method does not take any parameters
Returns
Return Type:Promise<GetEditorUrlsResponse>
Was this helpful?
Yes
No