Skip to content

Commit 4b8d386

Browse files
committed
feat: add images videos for live preview edit
1 parent 654f54b commit 4b8d386

12 files changed

Lines changed: 16 additions & 23 deletions

docs/07-Pro Features/02-edit-mode-live-preview.md

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,17 @@ import VideoPlayer from '@site/src/components/Video/player';
99
[Upgrade to Phoenix Code Pro](https://phcode.io/pricing) to access this feature.
1010
:::
1111

12-
**Edit Mode** lets you modify your page directly in the Live Preview. You can edit text, change element tags, update classes and IDs, insert new elements, rearrange them with drag and drop, swap images, edit links, and much more.
12+
**Edit Mode** lets you modify your page directly in the Live Preview. You can edit text, insert new elements, rearrange them with drag and drop, swap images, edit links, and much more.
1313
**Phoenix Code** updates your source code automatically as you make changes.
1414

1515
<VideoPlayer
16-
src="https://docs-images.phcode.dev/videos/live-preview-edit/live-preview-edit.mp4"
16+
src="https://docs-images.phcode.dev/website/videos/lp-edit-pro-dialog.mp4"
1717
/>
1818

1919
## Enabling Edit Mode
2020

21-
To switch to Edit Mode, click the **chevron icon** next to the **pen icon** in the Live Preview toolbar, then select **Edit Mode**.
21+
To switch to Edit Mode, click the **pen icon** in the Live Preview toolbar. This enables full interactivity in the Live Preview.
22+
> When enabled, the **pen icon** is highlighted in orange color.
2223
2324
![Live Preview Edit mode](./images/lp-mode.png "Live Preview edit mode")
2425

@@ -28,7 +29,7 @@ Alternatively, you can switch to Edit Mode by updating the `livePreviewMode` set
2829

2930
When you click an element in the Live Preview, a **Control Box** appears near it. This floating panel shows you what the element is and gives you tools to edit it.
3031

31-
<!-- Add an image here showing the Control Box with the info section and tools section visible -->
32+
![Control Box](./images/control-box.png "Control Box")
3233

3334
> The Control Box is shown only for editable elements. It is not shown for non-editable elements that are dynamically created by JavaScript.
3435
@@ -40,21 +41,23 @@ The left side of the Control Box displays information about the selected element
4041
- **Dimensions**: The element’s size in pixels (width × height)
4142
- **CSS classes**: The element’s classes, shown with a `.` prefix. If the element has more than three classes, only the first three are shown, followed by a “+N more” indicator
4243

43-
<!-- Add an image here showing the info section of the Control Box with tag name, ID, dimensions, and classes -->
44+
![Element Properties panel](./images/element-properties.png "Element Properties panel")
4445

4546
Clicking on the info section opens the [Element Properties](#edit-element-properties) editor, where you can edit the element’s tag name, classes, and ID.
4647

4748
### Select Parent
4849

4950
The **Select Parent** button *(up-arrow icon)* appears next to the info section. Clicking it selects the parent of the currently selected element.
5051

52+
![Select Parent button](./images/select-parent.png "Select Parent button")
53+
5154
> This button appears only when a valid parent exists. It is not shown when the parent is `body`, `html`, or a JavaScript-rendered element.
5255
5356
### Tools
5457

5558
The right side of the Control Box displays a set of tools you can use to modify the selected element. The available tools depend on the element type. Some buttons are shown for all elements, while others appear only for specific element types.
5659

57-
<!-- Add an image here showing the tools section of the Control Box -->
60+
![Tools section](./images/tools.png "Tools section")
5861

5962
- **Insert Element** *(plus icon)*: Opens a panel where you can insert a new HTML element before, after, or inside the selected element.
6063
*This option is available for all elements.*
@@ -86,7 +89,7 @@ The right side of the Control Box displays a set of tools you can use to modify
8689

8790
The **Hover Box** is a small tooltip that appears when you hover over an element in Edit Mode. It shows an icon and a label that describe the element type (for example, “Image”, “Button”, “Container”, “Paragraph”).
8891

89-
<!-- Add an image here showing the Hover Box tooltip on an element -->
92+
![Hover Box](./images/hover-box.png "Hover Box")
9093

9194
The Hover Box helps you quickly identify elements as you move your cursor over the page, without needing to click on them.
9295

@@ -98,15 +101,7 @@ By default, in Edit Mode, hovering over elements in the Live Preview highlights
98101

99102
To toggle this setting, click the **chevron icon** next to the **pen icon** in the Live Preview toolbar and unselect **Inspect Element on Hover**. By default, this option remains checked.
100103

101-
<!-- Add an image here showing the Inspect Element on Hover option in the mode selector dropdown -->
102-
103-
When **Inspect Element on Hover** is checked (default):
104-
- Hovering over elements shows highlights and the Hover Box
105-
- Clicking an element selects it and displays the Control Box
106-
107-
When **Inspect Element on Hover** is unchecked:
108-
- Hovering over elements has no effect
109-
- Clicking an element shows highlights and the Control Box
104+
![Inspect Element on Hover](./images/inspect-element-hover.png "Inspect Element on Hover option")
110105

111106
Alternatively, you can change this setting by updating the `livePreviewInspectElement` preference in the preferences file. Set it to `"hover"` (default) or `"click"`.
112107
See [Editing Preferences](../editing-text#editing-preferences) to learn how to edit the preferences file.
@@ -117,7 +112,7 @@ The **Element Properties** panel lets you edit an element's tag name, ID, classe
117112

118113
To open the panel, click on the **info section** (the left side showing the tag name, ID, and dimensions) of the [Control Box](#control-box).
119114

120-
<!-- Add an image here showing the Element Properties panel with the tag, ID, classes, and attributes sections -->
115+
![Element Properties panel](./images/element-properties.png "Element Properties panel")
121116

122117
The panel has four sections:
123118

@@ -126,8 +121,6 @@ The panel has four sections:
126121
- **Classes**: Existing classes are shown as chips with a **×** button to remove them. Click **+** to add new classes. You can type multiple class names separated by spaces.
127122
- **Attributes**: All other HTML attributes are shown as editable name-value pairs. Click **+** to add a new attribute, or **×** to remove one.
128123

129-
<!-- Add an image here showing the classes section with a few class chips and the add class input -->
130-
131124
To undo all changes made in the panel, click the **Reset** button in the panel header. This reverts the element to the state it was in when you first opened the panel.
132125

133126
## Insert Element
@@ -136,7 +129,7 @@ The **Insert Element** panel lets you add new HTML elements to your page directl
136129

137130
To open the panel, click the **Insert Element** button *(plus icon)* in the [Control Box](#control-box).
138131

139-
<!-- Add an image here showing the Insert Element panel with the position bar, search, and element grid -->
132+
![Insert Element panel](./images/insert-element.png "Insert Element panel")
140133

141134
### Choosing a Position
142135

@@ -155,7 +148,7 @@ The panel shows a grid of commonly used HTML elements like Paragraph, Heading, L
155148

156149
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.
157150

158-
<!-- Add an image here showing the search bar with results and the "Create" custom element option -->
151+
![Create custom element](./images/insert-element-custom.png "Create custom element")
159152

160153
After inserting an element, Phoenix Code automatically selects it in the Live Preview so you can continue editing it.
161154

@@ -173,7 +166,7 @@ To insert a line break, press `Shift + Enter`.
173166

174167
When you start editing text, a **Formatting Toolbar** appears near the element. It gives you quick access to common text formatting options.
175168

176-
<!-- Add an image here showing the Formatting Toolbar with the B, I, U buttons and the more button -->
169+
![Formatting Toolbar](./images/formatting-toolbar.png "Formatting Toolbar")
177170

178171
Select the text you want to format and click a formatting button, or use the keyboard shortcut. If no text is selected, the formatting is applied to the entire element. Clicking a format that is already applied removes it.
179172

@@ -190,7 +183,7 @@ Click the **More** button *(three-dots icon)* on the right side of the toolbar t
190183
- **Superscript**: `<sup>` tag
191184
- **Code**: `<code>` tag
192185

193-
<!-- Add an image here showing the More formatting dropdown with Strikethrough, Subscript, Superscript, and Code options -->
186+
![More formatting options](./images/formatting-more.png "More formatting options")
194187

195188
<VideoPlayer
196189
src="https://docs-images.phcode.dev/videos/live-preview-edit/inline-text-editing.mp4"
19.7 KB
Loading
45.1 KB
Loading
36.1 KB
Loading
21.3 KB
Loading
28.6 KB
Loading
55 KB
Loading
67.8 KB
Loading
-14.5 KB
Loading
-25.7 KB
Loading

0 commit comments

Comments
 (0)