The [theme editor](https://shopify.com/admin/themes/current/editor) is a tool that lets merchants customize the content and appearance of their store, and preview changes to their theme in real time. As a theme developer, you can allow merchants to customize their theme in the theme editor by introducing [settings](#allowing-for-customization-through-the-theme-editor), and by dividing your theme functionality into [modular sections and blocks](/docs/storefronts/themes/best-practices/templates-sections-blocks). You need to [integrate your theme with the theme editor](#integrating-your-theme-with-the-theme-editor) to create a seamless editing experience for merchants. In the theme editor preview, the merchant should see exactly what will appear in the storefront when the theme is live. ![The theme editor in the Shopify admin](/assets/themes/theme_editor.png) ## Accessing the theme editor through the Shopify admin Merchants can access the theme editor in the Shopify admin. 1. From the Shopify admin, go to **Online Store** > **Themes**. 2. Find the theme that you want to edit, and then click **Customize**. ## Accessing the theme editor during development To understand how your theme settings appear to merchants, you can preview your theme in the theme editor. You can access the theme editor during development by using the following methods: - Run your theme as a [development theme](/docs/storefronts/themes/tools/cli#development-themes) or [push your theme to a store](/docs/api/shopify-cli/theme/theme-push) using [Shopify CLI](/docs/api/shopify-cli/theme) - Connect a GitHub branch to your store using the [Shopify GitHub integration](/docs/storefronts/themes/tools/github) - Upload your theme as a ZIP to a Shopify store You should choose the preview method that makes the most sense for your current development process. ## Allowing for customization through the theme editor The settings that a merchant can access in the theme editor are controlled by the theme. Settings can be specified in the following places: - The theme's [config/settings_schema.json](/docs/storefronts/themes/architecture/settings) file - The setting attributes for each [section](/docs/storefronts/themes/architecture/sections/section-schema#settings) that's included in the theme. When a merchant configures these settings using the theme editor, their configurations are saved. Learn more about [theme settings, and the types of settings that you can add to your theme](/docs/storefronts/themes/architecture/settings). ## Live preview The theme editor can preview certain input settings as merchants interact with them, instead of refreshing the entire storefront preview after the merchant makes a selection. The following input setting categories support live preview: - [Color settings](#color-settings) - [Text settings](#text-settings) ### Color settings The theme editor can show a live preview of input settings that return a [`color` object](/docs/api/liquid/objects/color), including [color](/docs/storefronts/themes/architecture/settings/input-settings#color) and [color_background](/docs/themes/architecture/settings/input-settings#color_background). To allow the theme editor to preview color setting changes live, reference the setting in a `{% style %}` tag in a Liquid template, a section, or a snippet. You can reference the `color` object directly, or the one of the following properties of the object: - `red` - `green` - `blue` - `rgb` #### Limitations The theme editor can’t provide a live preview for color settings in the following cases: - **Filtered settings**: The theme editor can’t provide a live preview for color settings that have Liquid filters applied. For example, `{{ settings.colors_accent_2.rgb | replace ‘ ‘, ‘,’ }}` can’t be previewed live. - **Stylesheets**: The theme editor can’t provide a live preview for color settings that are referenced in stylesheets that are stored in the `/assets` directory of a theme. Instead, we recommend declaring a CSS variable in your `theme.liquid` layout file and referencing it in your theme’s CSS files. Refer to [theme.liquid](https://github.com/Shopify/dawn/blob/d902375db0a71d5d2d6091eea242b71a42aa16ad/layout/theme.liquid#L67) and [base.css](https://github.com/Shopify/dawn/blob/d902375db0a71d5d2d6091eea242b71a42aa16ad/assets/base.css#L5) in Dawn for an example implementation. ### Text settings The theme editor can show a live preview of plain or rich text settings. This includes the following settings: - [text](/docs/storefronts/themes/architecture/settings/input-settings#text) - [textarea](/docs/storefronts/themes/architecture/settings/input-settings#textarea) - [inline_richtext](/docs/themes/architecture/settings/input-settings#inline_richtext) - [richtext](/docs/storefronts/themes/architecture/settings/input-settings#richtext) To allow the theme editor to preview text settings live, the code where the setting is referenced must meet the following criteria: - The setting value must be the only child of its parent HTML element:
|
|
|
|
|
|
|
|
|
|
|
|
|
|