Skip to content

Allow to replace the selected element entirely, not just to replace its children #1

@marekweb

Description

@marekweb

The replace action works by replacing the children of the selected element.

This new feature would be an action that replaces the entire selected element.

It's going to take a different implementation strategy, because the current approach just selects the element (using the selector string) and then modifies its children.

To replace the whole selected element, we need to have access to the parent element and modify the parent's children.

It should continue to support replacing the element with an array of nodes or with no node at all (in which case the element is just removed without a trace).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions