Before you start
The Visual tab depends on your plan. Without it, the tab shows the plan that includes it, and the code editor works as usual. See Visual editor plan availability.Convert a code template to blocks
- Open the template in the editor. It opens in Code.
- Click the Visual tab. The Convert to visual dialog opens.
- Choose how to start:
- Check the page, then save.
See or edit a visual template’s code
- In a visual template, click the Code tab. You see Compiled Liquid: the code Foliant generates from your blocks and document styles. It’s read-only.
- To change it, click Edit code. From now on the code editor is active and saving saves your code.
- When you save, Foliant reads the blocks back from your code, so the template stays visual.
Switch back to Visual after editing code
Click the Visual tab. Foliant reads the blocks from your code:- Blocks whose code you didn’t change come back as they were.
- If some code no longer matches its block, or was written outside any block, the Switch back to Visual? dialog lists those parts under Parts kept as Custom Liquid, with the reason:
- Edited code: the block’s code changed, so it becomes a Custom Liquid block.
- Written outside any block: new code you added between blocks.
- Click Switch to Visual to continue, or Stay in Liquid to keep editing code.
Replace a template with a starter
Replace with a starter… in the top bar replaces everything in the editor with a starter template or design. The starters are code templates, so a visual template becomes a code template. Nothing changes until you save, and Discard brings back what you had.Good to know
- Custom Liquid blocks can be moved, styled and given conditions like any other block. Their code prints exactly as written.
- Converting is per template and only happens when you choose it.
- Templates made from a purchased design use the design editor and can’t be switched to Visual or Code here.