# `DialectoInContext.Live`
[🔗](https://github.com/dialecto-eu/dialecto-phoenix/blob/v0.1.0/lib/dialecto_in_context/live.ex#L1)

The per-request marking flag of live mode (spec-0025 §4 step 3).

Marking is never global in `:live`: it is a flag in the process dictionary
of the process that renders the page. `DialectoInContext.Plug` sets it for
a document `GET` of an editor, and `DialectoInContext.LiveView` sets it in
a LiveView process. Tasks and jobs are other processes and don't inherit it.

# `cookie`

```elixir
@spec cookie() :: String.t()
```

The name of the cookie (and of the session key) that holds the token.

# `marking?`

```elixir
@spec marking?() :: boolean()
```

True while the current process renders for an editor.

# `now`

```elixir
@spec now() :: integer()
```

Unix seconds now. Tests replace the clock with `config :dialecto_in_context, clock: fun`.

# `unmarked`

```elixir
@spec unmarked((-&gt; result)) :: result when result: term()
```

Runs `fun` with marking off and restores the flag after, even on a raise.
Wrap whatever renders a mail or any text that leaves the page.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
