is_editor()

Twig function of the framework; its result is escaped like any value.

{{ is_editor() }}

Whether the block is rendered for the block editor. Templates render inline fields in the editor even when they are empty, so content editors can fill them in.

{% if attrs.topline or is_editor() %}
    <p{{ field('topline') }}>{{ attrs.topline }}</p>
{% endif %}

Returns bool