hotedit
v0.5.0Open HTML reports in the browser and edit them live while the person watches, or by hand.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
open
Open an HTML file in hotedit so the person can watch and edit it in their browser. Returns the page URL. Call this before outline/read/edit when the page isn't open yet.
| Parameter | Type | Description |
|---|---|---|
file * | string | path of the HTML file |
browser | boolean | open the browser (default true) |
outline
List the elements of the page as an indented tree: [id] tag#id.class “text…”. Use the ids with read. Ids change when elements are added, removed or moved, so call outline again after such edits.
| Parameter | Type | Description |
|---|---|---|
file | string | path of the HTML file; optional when only one page is open |
read
The exact HTML source of one element (by id from outline), as it is in the file. Copy text from here into edit's `find`. Long data: URLs are shortened and can't be edited.
| Parameter | Type | Description |
|---|---|---|
id * | integer | element id from outline |
file | string | path of the HTML file; optional when only one page is open |
edit
Replace text in the HTML file: `find` must appear exactly once (add surrounding context to make it unique) unless `all` is true. The change is saved and shown to the user immediately. Use it for text, attributes, styles, inserted or removed elements, and chart data in <script> blocks.
| Parameter | Type | Description |
|---|---|---|
find * | string | exact source text to replace |
replace * | string | new text |
all | boolean | replace every occurrence |
file | string | path of the HTML file; optional when only one page is open |