You can use is_preview flag to add messages, placeholder content etc. inside a template or block when previewing the page inside the editor.

Syntax

{% is_preview %}

Scope

It’s accessible globally, in any template, section or block.

Example

{% if is_preview %}
<p>This appears only inside the editor</p>
{% endif %}
<p>This appears only inside the editor</p>