# What's the difference between the Builder.isEditing and the Builder.isPreviewing flags?

**URL:** <https://forum.builder.io/t/whats-the-difference-between-the-builder-isediting-and-the-builder-ispreviewing-flags/4005>\
**Category:** Technical Questions\
**Tags:** visual-editor\
**Created:** [August 8, 2023, 12:48pm UTC](https://forum.builder.io/t/whats-the-difference-between-the-builder-isediting-and-the-builder-ispreviewing-flags/4005 "2023-08-08T12:48:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![neri](https://avatars.discourse-cdn.com/v4/letter/n/da6949/32.png) [@neri](https://forum.builder.io/u/neri)\
**Post date:** [August 8, 2023, 12:48pm UTC](https://forum.builder.io/t/whats-the-difference-between-the-builder-isediting-and-the-builder-ispreviewing-flags/4005/1 "2023-08-08T12:48:44Z")

</div>

I see in the Docs these 2 flags, but i can’t find any explanation or an API reference of them.

So what does isEditing mean?

What does isPreviewing mean?

And what’s the difference between them?

> **[Enabling on-site previewing and editing in Builder.io - Builder.io](https://www.builder.io/c/docs/guides/preview-url-working#adding-builder-component-to-your-404-page)**
>
> Use this feature for accurate editing and previewing

---

<div class="post-metadata">

**Author:** ![JonathanLand](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@JonathanLand](https://forum.builder.io/u/JonathanLand)\
**Post date:** [August 8, 2023, 1:17pm UTC](https://forum.builder.io/t/whats-the-difference-between-the-builder-isediting-and-the-builder-ispreviewing-flags/4005/2 "2023-08-08T13:17:30Z")

</div>

`isEditing` only applies when the site is loaded inside the editor `iframe`. `isPreviewing` applies in this case, as well as when looking at a draft preview outside the editor (i.e. Preview → View current draft).

This works by reading specific search params from the URL, you can see this in the implementation of the `Builder` class (`node_modules/@builder.io/sdk/dist/src/builder.class.js:1656`)
