Skip to content

Commit 51ced2b

Browse files
committed
feat: add insert element docs
1 parent 4518f6d commit 51ced2b

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

docs/07-Pro Features/01-live-preview-edit.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,37 @@ To undo all changes made in the panel, click the **Reset** button in the panel h
142142

143143
---
144144

145+
## Insert Element
146+
147+
The **Insert Element** panel lets you add new HTML elements to your page directly from the Live Preview.
148+
149+
To open the panel, click the **Insert Element** button *(plus icon)* in the [Control Box](#control-box).
150+
151+
<!-- Add an image here showing the Insert Element panel with the position bar, search, and element grid -->
152+
153+
### Choosing a Position
154+
155+
At the top of the panel, four position buttons control where the new element will be placed relative to the selected element:
156+
157+
- **Before**: Inserts the new element immediately before the selected element
158+
- **After** (selected by default): Inserts the new element immediately after the selected element
159+
- **Inside**: Inserts the new element as the last child of the selected element
160+
- **Wrap**: Wraps the selected element inside the new element
161+
162+
> The **Inside** option is disabled for void elements (like `<img>` or `<br>`) since they cannot have children. The **Wrap** option only shows container elements (like `<div>`, `<section>`, `<form>`, etc.).
163+
164+
### Picking an Element
165+
166+
The panel shows a grid of commonly used HTML elements like Paragraph, Heading, Link, Image, Button, Div, List, Form, and many more. Each item shows the element name and its HTML tag. Click an item to insert it.
167+
168+
Use the **search bar** at the top to filter elements by name or tag. If no matching element exists, you can type any valid HTML tag name and click **Create &lt;tag&gt;** to insert a custom element.
169+
170+
<!-- Add an image here showing the search bar with results and the "Create" custom element option -->
171+
172+
After inserting an element, Phoenix Code automatically selects it in the Live Preview so you can continue editing it.
173+
174+
---
175+
145176
## Inline Text Editing
146177

147178
The **Inline Text Editing** feature lets you modify text content directly in the Live Preview, with all changes automatically synced to the source code.

0 commit comments

Comments
 (0)