Skip to content

Commit 0339b27

Browse files
committed
feat: write docs for text editing in live preview
1 parent f6fda3d commit 0339b27

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

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

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,8 @@ The Tool Box displays different options depending on the selected element type.
5959
- **Select Parent** *(up-arrow icon)*: Selects the parent of the currently selected element.
6060
*This button appears only when a valid parent exists (it is not shown when the parent is `body`, `html`, or a JavaScript-rendered element).*
6161

62-
- **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. Press `Enter` to save the edited text or `Esc` to cancel.
62+
- **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. See the [Editing Text](#editing-text) section for more details.
6363
*This button appears only for elements that can contain text (it is not available for `<img>`, `<video>`, `<br>`, etc.).*
64-
> You can also edit text by double-clicking the element in the Live Preview.
6564

6665
- **Edit Hyperlink** *(link icon)*: Opens a floating input box that lets you edit the element’s `href` attribute.
6766
*This button appears only for `<a>` elements.*
@@ -101,3 +100,25 @@ When **Edit Highlights on Hover** is unchecked:
101100
Alternatively, you can change this setting by updating the `livePreviewElementHighlights` preference in the preferences file. Set it to `"hover"` (default) or `"click"`. See [Editing Preferences](../editing-text#editing-preferences) to learn how to edit the preferences file.
102101

103102
---
103+
104+
## Editing Text
105+
106+
The **Editing Text** feature lets you modify text content directly in the Live Preview, with all changes automatically synced to the source code.
107+
108+
To start editing, **double-click** an element in the Live Preview or click the **Edit Text** button *(pencil icon)* in the Tool Box.
109+
Edit the text as needed, then press `Enter` to save or `Esc` to cancel.
110+
To insert a line break, press `Shift + Enter`.
111+
112+
> Text editing is available only for elements that can contain text. It is not supported for elements such as `<img>`, `<video>`, `<br>`, and similar non-text elements.
113+
114+
### Text Formatting
115+
116+
You can apply formatting to selected text using standard keyboard shortcuts:
117+
- **Ctrl/Cmd + B** — Bold; wraps selected text in `<b>` tags
118+
- **Ctrl/Cmd + I** — Italic; wraps selected text in `<i>` tags
119+
- **Ctrl/Cmd + U** — Underline; wraps selected text in `<u>` tags
120+
> If the text is already formatted, the formatting will be removed.
121+
122+
<!-- TODO: add video showing the edit text workflow -->
123+
124+
---

0 commit comments

Comments
 (0)