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
+13-11Lines changed: 13 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,13 +15,15 @@ You can edit text, drag and drop elements, change images and links, inspect elem
15
15
16
16
**Edit Mode** also has all the capabilities of **Highlight Mode**, such as moving your cursor in the editor when an element is clicked, and highlighting the corresponding element in Live Preview. It also works in reverse: moving your cursor in the editor highlights the corresponding element in Live Preview.
17
17
18
+
<!-- TODO: @devansh we can have a video here showing the features... -->
19
+
18
20
---
19
21
20
22
## Enabling Edit Mode
21
23
22
24
To switch to Edit Mode, click the **mode selector dropdown** in the Live Preview toolbar and select **Edit Mode**.
23
25
24
-
<!-- TODO: add image showing the mode selector dropdown with Edit Mode selected -->
Alternatively, you can switch to Edit Mode by updating the `livePreviewMode` setting in the preferences file. See [Editing Preferences](../editing-text#editing-preferences) to learn how to edit the preferences file.
27
29
@@ -32,7 +34,7 @@ Alternatively, you can switch to Edit Mode by updating the `livePreviewMode` set
32
34
The **Info Box** displays information about an element.
33
35
> 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.
34
36
35
-
<!-- TODO: add image showing Info Box-->
37
+

36
38
37
39
The Info Box displays:
38
40
-**Tag name and dimensions**: The element type (for example, `div`, `p`, `img`) and its size in pixels (width × height)
@@ -44,7 +46,7 @@ The Info Box displays:
44
46
45
47
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.
46
48
47
-
<!-- TODO: add image showing the grayInfo Box -->
49
+

48
50
49
51
---
50
52
@@ -53,7 +55,7 @@ The Info Box normally has a *blue* background for standard HTML elements (for ex
53
55
The **Tool Box** displays a set of tools you can use to modify elements in the Live Preview.
54
56
> The Tool Box appears only when you click an element or select it through the source code.
55
57
56
-
<!-- TODO: add image showing Tool Box-->
58
+

57
59
58
60
### Tool Box Options
59
61
@@ -62,7 +64,7 @@ The Tool Box displays different options depending on the selected element type.
62
64
-**Select Parent***(up-arrow icon)*: Selects the parent of the currently selected element.
63
65
*This button appears only when a valid parent exists (it is not shown when the parent is `body`, `html`, or a JavaScript-rendered element).*
64
66
65
-
-**Edit Text***(pencil 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
+
-**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.
66
68
*This button appears only for elements that can contain text (it is not available for `<img>`, `<video>`, `<br>`, etc.).*
67
69
See the [Inline Text Editing](#inline-text-editing) section for more details.
68
70
@@ -94,7 +96,7 @@ By default, in Edit Mode, hovering over elements in the Live Preview highlights
94
96
95
97
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.
96
98
97
-
<!-- TODO: add image showing the Inspect Element on Hover option in the mode dropdown -->
99
+

98
100
99
101
When **Inspect Element on Hover** is checked (default):
100
102
- Hovering over elements shows highlights and the Info Box
@@ -127,7 +129,7 @@ You can apply formatting to selected text using standard keyboard shortcuts:
127
129
-**Ctrl/Cmd + U**: Underline; wraps selected text in `<u>` tags
128
130
> If the text is already formatted, the formatting will be removed.
129
131
130
-
<!-- TODO: add video showing the edit text workflow -->
132
+
<!-- TODO: @devansh add video showing the edit text workflow -->
131
133
132
134
---
133
135
@@ -161,7 +163,7 @@ To cancel a drag, press `Esc`.
161
163
162
164
> When you drag an element near the top or bottom edge of the viewport, the Live Preview automatically scrolls in that direction.
163
165
164
-
<!-- TODO: add video showing drag and drop workflow with visual feedback -->
166
+
<!-- TODO: @devansh add video showing drag and drop workflow with visual feedback -->
165
167
166
168
---
167
169
@@ -176,7 +178,7 @@ The input box includes:
176
178
-**Open in new tab**: Check this option to make the link open in a new tab. Checking this option will add `target="_blank"` in your source code.
177
179
-**Open URL**: Clicking on this button opens the URL in your default browser. This option is available only in desktop apps.
Click the **More Options** button *(three-dots icon)* in the Tool Box and select **Cut**, **Copy**, or **Paste** from the dropdown menu.
206
208
@@ -223,7 +225,7 @@ These shortcuts work for all Edit Mode operations, including text edits, element
223
225
224
226
A **Quick Preview Toggle** button is available at the top center of the Live Preview. It lets you quickly switch to Preview Mode and back to the previously selected mode (Highlight Mode or Edit Mode). This is especially useful when working with a popped-out Live Preview window. You can also use the `F8` keyboard shortcut to toggle Preview Mode.
225
227
226
-
<!-- TODO: add a video showing its workflow -->
228
+
<!-- TODO: @devansh add a video showing its workflow -->
227
229
228
230
The button is partially visible as a thin strip at the top edge of the Live Preview. Moving your cursor over this strip reveals the full button, which you can click to toggle Preview Mode.
0 commit comments