You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/07-Pro Features/01-live-preview-edit.md
+52-41Lines changed: 52 additions & 41 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ import VideoPlayer from '@site/src/components/Video/player';
9
9
[Upgrade to Phoenix Code Pro](https://phcode.io/pricing) to access this feature.
10
10
:::
11
11
12
-
**Edit Mode** lets you modify your page directly in the Live Preview. You can edit text, rearrange elements, and update images and links. You can also duplicate, delete, and inspect elements with precise measurements.
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.
13
13
**Phoenix Code** updates your source code automatically as you make changes.
14
14
15
15
<VideoPlayer
@@ -28,84 +28,95 @@ Alternatively, you can switch to Edit Mode by updating the `livePreviewMode` set
28
28
29
29
---
30
30
31
-
## Info Box
31
+
## Control Box
32
32
33
-
The **Info Box** displays information about an element.
34
-
> By default, the Info Box appears when you hover over an element in the Live Preview, but this behavior can be changed. See the [Inspect Element on Hover](#inspect-element-on-hover) section for more details.
33
+
When you click an element in the Live Preview (or select it through the source code), a **Control Box** appears near it. This floating panel shows you what the element is and gives you tools to edit it.
35
34
36
-

35
+
<!-- Add an image here showing the Control Box with the info section and tools section visible -->
37
36
38
-
The Info Box displays:
39
-
-**Tag name and dimensions**: The element type (for example, `div`, `p`, `img`) and its size in pixels (width × height)
37
+
> The Control Box is shown only for editable elements. It is not shown for non-editable elements that are dynamically created by JavaScript.
38
+
39
+
### Element Info
40
+
41
+
The left side of the Control Box displays information about the selected element:
42
+
-**Tag name**: The element type (for example, `div`, `p`, `img`)
40
43
-**ID**: The element’s ID attribute (if present), shown with a `#` prefix
44
+
-**Dimensions**: The element’s size in pixels (width × height)
41
45
-**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
42
-
-**Link URL**: The element’s `href` attribute (if present). This is shown only for anchor (`<a>`) elements
43
46
44
-
#### Visual Indicators
47
+
<!-- Add an image here showing the info section of the Control Box with tag name, ID, dimensions, and classes -->
45
48
46
-
The Info Box normally has a *blue* background for standard HTML elements (for example, `<div>`, `<p>`, `<img>`). For dynamically created (JavaScript-rendered) elements, it appears with a *gray* background, indicating that these elements cannot be edited.
49
+
Clicking on the info section opens the [Element Properties](#element-properties) editor, where you can edit the element’s tag name, classes, and ID.
47
50
48
-

49
-
50
-
---
51
+
### Select Parent
51
52
52
-
## Tool Box
53
+
The **Select Parent** button *(up-arrow icon)* appears next to the info section. Clicking it selects the parent of the currently selected element.
53
54
54
-
The **Tool Box** displays a set of tools you can use to modify elements in the Live Preview.
55
-
> The Tool Box appears only when you click an element or select it through the source code.
55
+
*This button appears only when a valid parent exists (it is not shown when the parent is `body`, `html`, or a JavaScript-rendered element).*
56
56
57
-

57
+
### Tools
58
58
59
-
### Tool Box Options
59
+
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.
60
60
61
-
The Tool Box displays different options depending on the selected element type. Some buttons are available for all elements, while others are specific to certain element types.
61
+
<!-- Add an image here showing the tools section of the Control Box -->
62
62
63
-
-**Select Parent***(up-arrow icon)*: Selects the parent of the currently selected element.
64
-
*This button appears only when a valid parent exists (it is not shown when the parent is `body`, `html`, or a JavaScript-rendered element).*
65
-
66
-
-**Edit Text***(pen icon)*: Opens inline text editing for the selected element. You can edit text directly in the Live Preview, and Phoenix Code automatically updates the source code.
67
-
*This button appears only for elements that can contain text (it is not available for `<img>`, `<video>`, `<br>`, etc.).*
68
-
See the [Inline Text Editing](#inline-text-editing) section for more details.
63
+
-**Insert Element***(plus icon)*: Opens a panel where you can insert a new HTML element before, after, or inside the selected element.
64
+
*This option is available for all elements.*
65
+
See the [Insert Element](#insert-element) section for more details.
69
66
70
-
-**Edit Hyperlink***(link icon)*: Opens a floating input box that lets you edit the element's `href` attribute.
67
+
-**Edit Hyperlink***(chain icon)*: Opens a panel that lets you edit the element’s `href` attribute.
71
68
*This button appears only for `<a>` elements.*
72
69
See the [Edit Hyperlink](#edit-hyperlink) section for more details.
73
70
74
-
-**Image Gallery***(image icon)*: Opens an image gallery at the bottom of the Live Preview, where you can browse and select an image. You can also choose an image from your computer. Phoenix Code automatically saves the image to your project folder and updates the src attribute of the element.
71
+
-**Change Image***(image icon)*: Opens an image gallery at the bottom of the Live Preview, where you can browse and select an image. You can also choose an image from your computer. Phoenix Code automatically saves the image to your project folder and updates the `src` attribute of the element.
75
72
*This button appears only for `<img>` elements.*
76
-
See [Image Gallery](./02-image-gallery.md) for more details.
73
+
See [Image Gallery](./02-image-gallery.md) for more details.
74
+
75
+
-**Edit Text***(pen icon)*: Opens inline text editing for the selected element. You can edit text directly in the Live Preview, and Phoenix Code automatically updates the source code.
76
+
*This button appears only for elements that can contain text (it is not available for `<img>`, `<video>`, `<br>`, etc.).*
77
+
See the [Inline Text Editing](#inline-text-editing) section for more details.
77
78
78
79
-**Duplicate***(copy icon)*: Copies the selected element and places it below. You can also duplicate elements using `Ctrl/Cmd + D` after clicking an element.
79
80
*This option is available for all elements.*
80
81
81
82
-**Delete***(trash icon)*: Deletes the selected element. You can also delete elements using the `Delete` key after clicking an element.
82
83
*This option is available for all elements.*
83
84
84
-
-**More Options***(three-dots icon)*: Opens a menu with additional actions. You can also open this menu by right-clicking anywhere in the live preview, but only in Edit Mode.
85
+
-**More Options***(three-dots icon)*: Opens a menu with additional actions. You can also open this menu by right-clicking anywhere in the Live Preview, but only in Edit Mode.
85
86
*This option is available for all elements.*
86
-
See [Cut, Copy, and Paste](#cut-copy-and-paste) for more details.
87
+
See [Cut, Copy, and Paste](#cut-copy-and-paste) for more details.
88
+
89
+
---
90
+
91
+
## Hover Box
92
+
93
+
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”).
94
+
95
+
<!-- Add an image here showing the Hover Box tooltip on an element -->
96
+
97
+
The Hover Box helps you quickly identify elements as you move your cursor over the page, without needing to click on them.
87
98
88
-
> The Tool Box is never shown for non-editable elements that are dynamically created by JavaScript.
99
+
> The Hover Box uses a different color for editable and non-editable elements. Standard HTML elements appear in blue, while dynamically created (JavaScript-rendered) elements appear in gray.
89
100
90
101
---
91
102
92
103
## Inspect Element on Hover
93
104
94
-
By default, in Edit Mode, hovering over elements in the Live Preview highlights them and displays the Info Box. You can change this behavior to show highlights only when you click elements instead.
105
+
By default, in Edit Mode, hovering over elements in the Live Preview highlights them and displays the [Hover Box](#hover-box). You can change this behavior to show highlights only when you click elements instead.
95
106
96
107
To toggle this setting, click the **mode selector dropdown** in the Live Preview toolbar and unselect **Inspect Element on Hover**. By default, this option remains checked.
97
108
98
-

109
+
<!-- Add an image here showing the Inspect Element on Hover option in the mode selector dropdown -->
99
110
100
111
When **Inspect Element on Hover** is checked (default):
101
-
- Hovering over elements shows highlights and the Info Box
102
-
- Clicking an element selects it and displays the Tool Box along with the Info Box
112
+
- Hovering over elements shows highlights and the Hover Box
113
+
- Clicking an element selects it and displays the Control Box
103
114
104
115
When **Inspect Element on Hover** is unchecked:
105
116
- Hovering over elements has no effect
106
-
- Clicking an element shows highlights, the Info Box, and the Tool Box
117
+
- Clicking an element shows highlightsand the Control Box
107
118
108
-
Alternatively, you can change this setting by updating the `livePreviewElementHighlights` preference in the preferences file. Set it to `"hover"` (default) or `"click"`.
119
+
Alternatively, you can change this setting by updating the `livePreviewInspectElement` preference in the preferences file. Set it to `”hover”` (default) or `”click”`.
109
120
See [Editing Preferences](../editing-text#editing-preferences) to learn how to edit the preferences file.
110
121
111
122
---
@@ -114,7 +125,7 @@ See [Editing Preferences](../editing-text#editing-preferences) to learn how to e
114
125
115
126
The **Inline Text Editing** feature lets you modify text content directly in the Live Preview, with all changes automatically synced to the source code.
116
127
117
-
To start editing, **double-click** an element in the Live Preview or click the **Edit Text** button *(pen icon)* in the Tool Box.
128
+
To start editing, **double-click** an element in the Live Preview or click the **Edit Text** button *(pen icon)* in the Control Box.
118
129
Edit the text as needed, then press `Enter` to save or `Esc` to cancel.
119
130
To insert a line break, press `Shift + Enter`.
120
131
@@ -174,7 +185,7 @@ To cancel a drag, press `Esc`.
174
185
175
186
The **Edit Hyperlink** feature lets you modify the URL and behavior of anchor (`<a>`) elements directly in the Live Preview.
176
187
177
-
To edit a hyperlink, select an `<a>` element and click the **Edit Hyperlink** button *(link icon)* in the Tool Box. A floating input box appears near the element.
188
+
To edit a hyperlink, select an `<a>` element and click the **Edit Hyperlink** button *(chain icon)* in the Control Box. An editing panel appears near the element.
178
189
179
190
The input box includes:
180
191
-**URL input**: Edit the link's destination (`href` attribute). Press `Enter` to save your changes or `Esc` to cancel.
@@ -195,7 +206,7 @@ The **Measurements** feature displays ruler lines from the edges of a selected e
195
206
196
207
## Cut, Copy, and Paste
197
208
198
-
You can cut, copy, and paste elements in Edit Mode using standard keyboard shortcuts or the Tool Box **More Options** menu *(three-dots icon)*.
209
+
You can cut, copy, and paste elements in Edit Mode using standard keyboard shortcuts or the Control Box **More Options** menu *(three-dots icon)*.
199
210
200
211
### Using Keyboard Shortcuts
201
212
@@ -207,7 +218,7 @@ When you click an element in the Live Preview, keyboard focus moves to the Live
Copy file name to clipboardExpand all lines: docs/07-Pro Features/02-image-gallery.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ The **Image Gallery** is a panel that appears at the bottom of the Live Preview.
13
13
14
14
> The Image Gallery is available only for `<img>` elements.
15
15
16
-
By default, the Image Gallery appears when you select an `<img>` element. You can close it by clicking the Image Gallery button in the Tool Box or the close button in the gallery. To reopen it, click the Image Gallery button again.
16
+
By default, the Image Gallery appears when you select an `<img>` element. You can close it by clicking the Change Image button in the Control Box or the close button in the gallery. To reopen it, click the Change Image button again.
Copy file name to clipboardExpand all lines: docs/07-Pro Features/03-measurements.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ To enable measurements, click the **mode selector dropdown** in the Live Preview
20
20
21
21

22
22
23
-
Alternatively, you can enable measurements from the **More Options** menu *(three-dots icon)* in the Tool Box. Select **Show Measurements** to toggle it on or off.
23
+
Alternatively, you can enable measurements from the **More Options** menu *(three-dots icon)* in the Control Box. Select **Show Measurements** to toggle it on or off.
24
24
25
25
You can also change this setting by updating the `livePreviewShowMeasurements` preference in the preferences file. Set it to `true` or `false` (default).
26
26
See [Editing Preferences](../editing-text#editing-preferences) to learn how to edit the preferences file.
0 commit comments