Skip to main content

Remove Tag

Removes a tag pair while preserving the content within the tags.

#Purpose

This refactoring automates the common task of deleting a tag. Regardless of where you have initiated it, Remove Tag will automatically find the corresponding opening and closing tags, and deletes them.

#Availability

Available from the context menu or via shortcuts:

  • when the edit cursor or caret is on an opening or closing tag.

#Notes

  • If the code provider is applied within a XAML document to a tag containing one of the following properties, these properties are moved to a child tag.

    • Canvas.Left
    • Canvas.Top
    • DockPanel.Dock
    • Grid.Column
    • Grid.ColumnSpan
    • Grid.Row
    • Grid.RowSpan

#Example

<div><img src="D:\Image1.jpg" id="img1" style="width: 100px;" /></div>

Result:

<img src="D:\Image1.jpg" id="img1" style="width: 100px;" />

This code provider is the opposite of Surround with Tag.

#Screenshot

rsRemoveTag