# How editing works

> The AI writes drafts and publishes nothing. Understanding that one rule explains the Publish button, the badge beside it, and why your change is not live yet.
>
> From the MightyBuilder documentation: https://docs.mightybuilder.ai/getting-started/how-editing-works

This is the page that explains the button you will press most often, and the
one thing that confuses almost everybody on their first afternoon.

## The AI writes drafts. It publishes nothing.

Every change the AI makes is saved to a **draft**. Ask for a five-page site and
you get five pages to look at — not five pages on the internet.

Nothing you or the AI does reaches a visitor until you press **Publish**.

This is deliberate. An assistant that could change a live business website
mid-sentence would be a bad idea however good it was, and "have a look first" is
the whole point of a draft.

## Every record has two versions

A page, a block and the site's own settings each exist twice at once:

- the **draft**, which is what you see in the dashboard and what the AI writes
- the **published** version, which is what a visitor sees

They are independent until you publish. You can rewrite the homepage over an
afternoon, change your mind, and the live site will not have moved.

## Publish sends everything

The Publish button publishes the **whole site**, not the page you are looking
at. There is deliberately no way to send less.

The reason is that pages are not independent. A page can embed a block, link to
another page, and rely on the site's CSS — so publishing one page on its own can
produce a live site that is broken rather than merely out of date. Sending
everything at once means what goes live is a set of things that were written to
work together.

## The badge is the safety net

Beside Publish is a count of everything waiting to go out. If it says nothing is
waiting, the live site matches your drafts. If it says four, four things have
changed since the last publish.

It is worth trusting. It compares each of your drafts against the release that
is live right now, rather than against a note of what was published — a note is
the kind of thing that drifts, and a comparison against the real thing cannot.

## Point at the thing you mean

Most small edits are hard to *say* and easy to *see*. Rather than writing "the
paragraph under the second heading in the services section", point at it.

Press the **pencil** beside Publish. It is there on a page's **Content** tab,
the one with the preview, and while it is on the preview is in edit mode:

- Moving the pointer outlines whatever is under it.
- A click selects it. A small label at its corner names it, and opening the
  label lists what it sits inside, so you can pick the whole card rather than
  the line of text in it.
- What you selected appears as a chip above the message box. Type what you
  want, "rewrite this", "make this shorter", "a different picture here", and
  the AI reads it alongside your words. Remove the chip with its × if you
  picked the wrong thing.
- Links do nothing, so you can select one without leaving the page.

Press the pencil again and the preview is an ordinary one, drawn exactly as a
visitor would see it.

The AI knows the thing you selected is usually a *part* of what you mean:
select the text inside a card and ask for the card to change colour, and it
will work on the card.

It also knows when the thing you selected is not really on this page. Your
header and footer are usually **blocks**, shared pieces rendered into every
page, so selecting a menu item on the homepage is pointing at the header
block, and the chip says so. The AI edits the block, and tells you the change
will show on every page that uses it.

After the edit, the preview stays put: whatever you pointed at is kept where
it was on screen, rather than the page jumping back to the top.

## Retyping text yourself

A typo or a reworded sentence does not need the AI. With the pencil on, select
a piece of text and click inside it again, and you can type over it where it
is.

- **Enter** starts a new line inside that piece of text. It never starts a new
  paragraph.
- **Escape** cancels and puts the text back.
- **Clicking away** saves it to your draft, like any other change: it has its
  revisions, and it waits for Publish.

Only plain text written into this page can be retyped. Text with formatting
inside it (a bold word, a coloured phrase), text the site fills in for itself
(a title in a list, an item's field, anything a loop wrote) and text in a block
such as your header stay the AI's to change. The label says why when you
select one; ask for the change in words instead.

## Links in the preview go somewhere

With the pencil off, the preview behaves like your site. Click a link to
another page or item on your site and that page's editor opens. A link that
leads off your site does nothing.

## So if your change is not live

Look at the badge, and press Publish. That is the answer far more often than
anything else in these pages.
