Theme editor
Open the merchant theme editor around your local dev server with salla theme dev --editor.
Use the theme editor when you want to see how a merchant will edit your theme, which the dev settings panel cannot show. Your code keeps running on your machine and the editor frames it.
salla theme dev --editorsalla theme preview is the same thing under another name (salla theme dev --editor calls it).
Before you start
- You are signed in:
salla login. - The theme belongs to your partner account and has a GitHub repository (the optional step of
salla theme create). Your folder's git remote points at it. - The theme is installed on at least one of your stores. If it is on none, the CLI offers to create a store.
What happens
- It checks the toolchain and finds which theme the folder is, from its git remote.
- It lists the stores the theme is installed on and picks one. The store in
.envwins when the theme is installed on it, so the editor and your local server show the same store. Otherwise you choose from a list, or pass--store <name or id>. - It binds that store, starts the dev server, and asks Salla for an editor address for that theme, store and latest commit.
- It adds your dev server's address to that URL and opens it.
Nothing is uploaded. The editor loads your theme from localhost.
Options
| Option | Meaning |
|---|---|
-s, --store <store> | Store name or id. Must be one of the theme's installed stores. |
-E, --without-editor | Skip the editor and run the storefront only. |
-b, --browser <browser> | Browser to open. Default chrome. |
-o, --only-link | Do not open a browser. |
salla theme dev --editor also accepts --port and --no-open.
--store means something narrower here than on dev. Preview checks it against the theme's installed stores and ignores it if it is not one of them, so it never overwrites a store binding that works.
If the editor does not open
The editor is a bonus, never a requirement. If it cannot open (not signed in, offline, theme not installed anywhere), the dev server keeps running and the CLI prints the plain storefront address. Run salla login, check salla theme list, then try again.
Next: Publish