Closed Bug 835961 Opened 9 years ago Closed 8 years ago

Should be able to add new elements with the inspector.

Categories

(DevTools :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 895561

People

(Reporter: mythmon, Unassigned)

References

(Blocks 1 open bug)

Details

We can edit elements from the inspector, and delete elements, but we cannot add new elements. This would be useful. Maybe the UI could be something like right clicking on an existing element, and having the option to either add a new element as a child or as a sibling of that element.

Alternatively, we could do what Chrome does. It allows you to edit an element as plain text. When you do this, you can type another element's tag, and when you save a new element will be in the DOM. Currently we can only edit the tag name, the attribute, and the text of the text content of the element, and the text content is escaped, so if `<em>bold</em>` is typed, it is escaped to "&gt;em&lt;bold&gt;/em&lt;".
Related to bug 835964 and bug 839640. We need to rethink how we parse user's input.
We can now add children and sibling elements using the "Edit as HTML" feature (Introduced in 27).
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 895561
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.